Kapacitor execution module.
This module accepts connection configuration details either as parameters or as configuration settings in /etc/salt/minion on the relevant minions:
kapacitor.host: 'localhost'
kapacitor.port: 9092
New in version 2016.11.0.
Also protocol and SSL settings could be configured:
kapacitor.unsafe_ssl: 'false'
kapacitor.protocol: 'http'
New in version 2019.2.0.
This data can also be passed into pillar. Options passed into opts will overwrite options passed into pillar.
salt.modules.kapacitor.
define_task
(name, tick_script, task_type='stream', database=None, retention_policy='default', dbrps=None)¶Define a task. Serves as both create/update.
Name of the task.
Path to the TICK script for the task. Can be a salt:// source.
Task type. Defaults to 'stream'
A list of databases and retention policies in "dbname"."rpname" format to fetch data from. For backward compatibility, the value of 'database' and 'retention_policy' will be merged as part of dbrps.
New in version 2019.2.0.
Which database to fetch data from.
Which retention policy to fetch data from. Defaults to 'default'.
CLI Example:
salt '*' kapacitor.define_task cpu salt://kapacitor/cpu.tick database=telegraf
salt.modules.kapacitor.
delete_task
(name)¶Delete a kapacitor task.
Name of the task to delete.
CLI Example:
salt '*' kapacitor.delete_task cpu
salt.modules.kapacitor.
disable_task
(name)¶Disable a kapacitor task.
Name of the task to disable.
CLI Example:
salt '*' kapacitor.disable_task cpu
salt.modules.kapacitor.
enable_task
(name)¶Enable a kapacitor task.
Name of the task to enable.
CLI Example:
salt '*' kapacitor.enable_task cpu
salt.modules.kapacitor.
get_task
(name)¶Get a dict of data on a task.
Name of the task to get information about.
CLI Example:
salt '*' kapacitor.get_task cpu
salt.modules.kapacitor.
version
()¶Get the kapacitor version.