influxdb08

Interface with InfluxDB 0.5-0.8

Important

You can optionally specify default connection parameters via the general influxdb08 setup.

saltext.influxdb.modules.influxdb08mod.db_list(user=None, password=None, host=None, port=None)[source]

List all InfluxDB databases

user

The user to connect as

password

The password of the user

host

The host to connect to

port

The port to connect to

CLI Example:

salt '*' influxdb08.db_list
salt '*' influxdb08.db_list <user> <password> <host> <port>
saltext.influxdb.modules.influxdb08mod.db_exists(name, user=None, password=None, host=None, port=None)[source]

Checks if a database exists in Influxdb

name

Database name to create

user

The user to connect as

password

The password of the user

host

The host to connect to

port

The port to connect to

CLI Example:

salt '*' influxdb08.db_exists <name>
salt '*' influxdb08.db_exists <name> <user> <password> <host> <port>
saltext.influxdb.modules.influxdb08mod.db_create(name, user=None, password=None, host=None, port=None)[source]

Create a database

name

Database name to create

user

The user to connect as

password

The password of the user

host

The host to connect to

port

The port to connect to

CLI Example:

salt '*' influxdb08.db_create <name>
salt '*' influxdb08.db_create <name> <user> <password> <host> <port>
saltext.influxdb.modules.influxdb08mod.db_remove(name, user=None, password=None, host=None, port=None)[source]

Remove a database

name

Database name to remove

user

The user to connect as

password

The password of the user

host

The host to connect to

port

The port to connect to

CLI Example:

salt '*' influxdb08.db_remove <name>
salt '*' influxdb08.db_remove <name> <user> <password> <host> <port>
saltext.influxdb.modules.influxdb08mod.user_list(database=None, user=None, password=None, host=None, port=None)[source]

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.

database

The database to list the users from

user

The user to connect as

password

The password of the user

host

The host to connect to

port

The port to connect to

CLI Example:

salt '*' influxdb08.user_list
salt '*' influxdb08.user_list <database>
salt '*' influxdb08.user_list <database> <user> <password> <host> <port>
saltext.influxdb.modules.influxdb08mod.user_exists(name, database=None, user=None, password=None, host=None, port=None)[source]

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.

name

User name

database

The database to check for the user to exist

user

The user to connect as

password

The password of the user

host

The host to connect to

port

The port to connect to

CLI Example:

salt '*' influxdb08.user_exists <name>
salt '*' influxdb08.user_exists <name> <database>
salt '*' influxdb08.user_exists <name> <database> <user> <password> <host> <port>
saltext.influxdb.modules.influxdb08mod.user_create(name, passwd, database=None, user=None, password=None, host=None, port=None)[source]

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.

name

User name for the new user to create

passwd

Password for the new user to create

database

The database to create the user in

user

The user to connect as

password

The password of the user

host

The host to connect to

port

The port to connect to

CLI Example:

salt '*' influxdb08.user_create <name> <passwd>
salt '*' influxdb08.user_create <name> <passwd> <database>
salt '*' influxdb08.user_create <name> <passwd> <database> <user> <password> <host> <port>
saltext.influxdb.modules.influxdb08mod.user_chpass(name, passwd, database=None, user=None, password=None, host=None, port=None)[source]

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.

name

User name for whom to change the password

passwd

New password

database

The database on which to operate

user

The user to connect as

password

The password of the user

host

The host to connect to

port

The port to connect to

CLI Example:

salt '*' influxdb08.user_chpass <name> <passwd>
salt '*' influxdb08.user_chpass <name> <passwd> <database>
salt '*' influxdb08.user_chpass <name> <passwd> <database> <user> <password> <host> <port>
saltext.influxdb.modules.influxdb08mod.user_remove(name, database=None, user=None, password=None, host=None, port=None)[source]

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.

name

User name to remove

database

The database to remove the user from

user

User name for the new user to delete

user

The user to connect as

password

The password of the user

host

The host to connect to

port

The port to connect to

CLI Example:

salt '*' influxdb08.user_remove <name>
salt '*' influxdb08.user_remove <name> <database>
salt '*' influxdb08.user_remove <name> <database> <user> <password> <host> <port>
saltext.influxdb.modules.influxdb08mod.retention_policy_get(database, name, user=None, password=None, host=None, port=None)[source]

Get an existing retention policy.

database

The database to operate on.

name

Name of the policy to modify.

CLI Example:

salt '*' influxdb08.retention_policy_get metrics default
saltext.influxdb.modules.influxdb08mod.retention_policy_exists(database, name, user=None, password=None, host=None, port=None)[source]

Check if a retention policy exists.

database

The database to operate on.

name

Name of the policy to modify.

CLI Example:

salt '*' influxdb08.retention_policy_exists metrics default
saltext.influxdb.modules.influxdb08mod.retention_policy_add(database, name, duration, replication, default=False, user=None, password=None, host=None, port=None)[source]

Add a retention policy.

database

The database to operate on.

name

Name of the policy to modify.

duration

How long InfluxDB keeps the data.

replication

How many copies of the data are stored in the cluster.

default

Whether this policy should be the default or not. Default is False.

CLI Example:

salt '*' influxdb.retention_policy_add metrics default 1d 1
saltext.influxdb.modules.influxdb08mod.retention_policy_alter(database, name, duration, replication, default=False, user=None, password=None, host=None, port=None)[source]

Modify an existing retention policy.

database

The database to operate on.

name

Name of the policy to modify.

duration

How long InfluxDB keeps the data.

replication

How many copies of the data are stored in the cluster.

default

Whether this policy should be the default or not. Default is False.

CLI Example:

salt '*' influxdb08.retention_policy_modify metrics default 1d 1
saltext.influxdb.modules.influxdb08mod.query(database, query, time_precision='s', chunked=False, user=None, password=None, host=None, port=None)[source]

Querying data

database

The database to query

query

Query to be executed

time_precision

Time precision to use (‘s’, ‘m’, or ‘u’)

chunked

Whether is chunked or not

user

The user to connect as

password

The password of the user

host

The host to connect to

port

The port to connect to

CLI Example:

salt '*' influxdb08.query <database> <query>
salt '*' influxdb08.query <database> <query> <time_precision> <chunked> <user> <password> <host> <port>
saltext.influxdb.modules.influxdb08mod.login_test(name, password, database=None, host=None, port=None)[source]

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.

name

The user to connect as

password

The password of the user

database

[The database to try to log in to] Not respected.

host

The host to connect to

port

The port to connect to

CLI Example:

salt '*' influxdb08.login_test <name>
salt '*' influxdb08.login_test <name> <database>
salt '*' influxdb08.login_test <name> <database> <user> <password> <host> <port>