InfluxDB - A distributed time series database
Module to provide InfluxDB compatibility to Salt (compatible with InfluxDB version 0.5+)
2014.7.0 新版功能.
depends: |
|
---|---|
configuration: | This module accepts connection configuration details either as parameters or as configuration settings in /etc/salt/minion on the relevant minions: influxdb.host: 'localhost'
influxdb.port: 8086
influxdb.user: 'root'
influxdb.password: 'root'
This data can also be passed into pillar. Options passed into opts will overwrite options passed into pillar. |
salt.modules.influx.
db_create
(name, user=None, password=None, host=None, port=None)¶Create a database
命令行接口CLI 范例:
salt '*' influxdb.db_create <name>
salt '*' influxdb.db_create <name> <user> <password> <host> <port>
salt.modules.influx.
db_exists
(name, user=None, password=None, host=None, port=None)¶Checks if a database exists in InfluxDB
命令行接口CLI 范例:
salt '*' influxdb.db_exists <name>
salt '*' influxdb.db_exists <name> <user> <password> <host> <port>
salt.modules.influx.
db_list
(user=None, password=None, host=None, port=None)¶List all InfluxDB databases
命令行接口CLI 范例:
salt '*' influxdb.db_list
salt '*' influxdb.db_list <user> <password> <host> <port>
salt.modules.influx.
db_remove
(name, user=None, password=None, host=None, port=None)¶Remove a database
命令行接口CLI 范例:
salt '*' influxdb.db_remove <name>
salt '*' influxdb.db_remove <name> <user> <password> <host> <port>
salt.modules.influx.
login_test
(name, password, database=None, host=None, port=None)¶Checks if a credential pair can log in at all.
If a database is specified: it will check for database user existence. If a database is not specified: it will check for cluster admin existence.
命令行接口CLI 范例:
salt '*' influxdb.login_test <name>
salt '*' influxdb.login_test <name> <database>
salt '*' influxdb.login_test <name> <database> <user> <password> <host> <port>
salt.modules.influx.
query
(database, query, time_precision='s', chunked=False, user=None, password=None, host=None, port=None)¶Querying data
命令行接口CLI 范例:
salt '*' influxdb.query <database> <query>
salt '*' influxdb.query <database> <query> <time_precision> <chunked> <user> <password> <host> <port>
salt.modules.influx.
retention_policy_add
(database, name, duration, replication, default=False, user=None, password=None, host=None, port=None)¶Add a retention policy.
命令行接口CLI 范例:
salt '*' influxdb.retention_policy_add metrics default 1d 1
salt.modules.influx.
retention_policy_alter
(database, name, duration, replication, default=False, user=None, password=None, host=None, port=None)¶Modify an existing retention policy.
命令行接口CLI 范例:
salt '*' influxdb.retention_policy_modify metrics default 1d 1
salt.modules.influx.
retention_policy_exists
(database, name, user=None, password=None, host=None, port=None)¶Check if a retention policy exists.
命令行接口CLI 范例:
salt '*' influxdb.retention_policy_exists metrics default
salt.modules.influx.
retention_policy_get
(database, name, user=None, password=None, host=None, port=None)¶Get an existing retention policy.
命令行接口CLI 范例:
salt '*' influxdb.retention_policy_get metrics default
salt.modules.influx.
user_chpass
(name, passwd, database=None, user=None, password=None, host=None, port=None)¶Change password for a cluster admin or a database user.
If a database is specified: it will update database user password. If a database is not specified: it will update cluster admin password.
命令行接口CLI 范例:
salt '*' influxdb.user_chpass <name> <passwd>
salt '*' influxdb.user_chpass <name> <passwd> <database>
salt '*' influxdb.user_chpass <name> <passwd> <database> <user> <password> <host> <port>
salt.modules.influx.
user_create
(name, passwd, database=None, user=None, password=None, host=None, port=None)¶Create a cluster admin or a database user.
If a database is specified: it will create database user. If a database is not specified: it will create a cluster admin.
命令行接口CLI 范例:
salt '*' influxdb.user_create <name> <passwd>
salt '*' influxdb.user_create <name> <passwd> <database>
salt '*' influxdb.user_create <name> <passwd> <database> <user> <password> <host> <port>
salt.modules.influx.
user_exists
(name, database=None, user=None, password=None, host=None, port=None)¶Checks if a cluster admin or database user exists.
If a database is specified: it will check for database user existence. If a database is not specified: it will check for cluster admin existence.
命令行接口CLI 范例:
salt '*' influxdb.user_exists <name>
salt '*' influxdb.user_exists <name> <database>
salt '*' influxdb.user_exists <name> <database> <user> <password> <host> <port>
salt.modules.influx.
user_list
(database=None, user=None, password=None, host=None, port=None)¶List cluster admins or database users.
If a database is specified: it will return database users list. If a database is not specified: it will return cluster admins list.
命令行接口CLI 范例:
salt '*' influxdb.user_list
salt '*' influxdb.user_list <database>
salt '*' influxdb.user_list <database> <user> <password> <host> <port>
salt.modules.influx.
user_remove
(name, database=None, user=None, password=None, host=None, port=None)¶Remove a cluster admin or a database user.
If a database is specified: it will remove the database user. If a database is not specified: it will remove the cluster admin.
命令行接口CLI 范例:
salt '*' influxdb.user_remove <name>
salt '*' influxdb.user_remove <name> <database>
salt '*' influxdb.user_remove <name> <database> <user> <password> <host> <port>