key_file: /etc/influxdb/ssl/key.pem
cert_file: /etc/influxdb/ssl/cert.pem
-Single-node influxdb where you specify paths for data and metastore directories. You
-need to ensure that directories exist:
+Single-node influxdb where you specify paths for data and metastore directories. Custom
+directories are created by this formula:
.. code-block:: yaml
source: 'deb https://repos.influxdata.com/${linux:system:os} ${linux:system:dist} stable'
key_url: 'https://repos.influxdata.com/influxdb.key'
+InfluxDB client for configuring databases, users and retention policies:
+
+.. code-block:: yaml
+
+ influxdb:
+ client:
+ enabled: true
+ server:
+ protocol: http
+ host: 127.0.0.1
+ port: 8086
+ user: admin
+ password: foobar
+ user:
+ user1:
+ enabled: true
+ admin: true
+ name: username1
+ database:
+ mydb1:
+ enabled: true
+ name: mydb1
+ retention_policy:
+ - name: rp_db1
+ duration: 30d
+ replication: 1
+ is_default: true
+ grant:
+ username1_mydb1:
+ enabled: true
+ user: username1
+ database: mydb1
+ privilege: all
+
+InfluxDB client state's that uses curl can be forced to retry query if curl call fails:
+
+.. code-block:: yaml
+
+ influxdb:
+ client:
+ enabled: true
+ retry:
+ count: 3
+ delay: 3
+
+Create an continuous queries:
+
+.. code-block:: yaml
+
+ influxdb:
+ client:
+ database:
+ mydb1:
+ continuous_query:
+ cq_avg_bus_passengers: >-
+ SELECT mean("passengers") INTO "transportation"."three_weeks"."average_passengers" FROM "bus_data" GROUP BY time(1h)
+
+Prunning data and data management:
+
+Intended to use in scheduled jobs, executed to maintain data life cycle above retention policy. These states are executed by
+``query.sls`` and you are expected to trigger ``sls_id`` individually.
+
+.. code-block:: yaml
+
+ influxdb:
+ client:
+ database:
+ mydb1:
+ query:
+ drop_measurement_h2o: >-
+ DROP MEASUREMENT h2o_quality
+ drop_shard_h2o: >-
+ DROP SHARD h2o_quality
+ drop_series_h2o_feet: >-
+ DROP SERIES FROM "h2o_feet"
+ drop_series_h2o_feet_loc_smonica: >-
+ DROP SERIES FROM "h2o_feet" WHERE "location" = 'santa_monica'
+ delete_h2o_quality_rt3: >-
+ DELETE FROM "h2o_quality" WHERE "randtag" = '3'
+ delete_h2o_quality: >-
+ DELETE FROM "h2o_quality"
+
+
+.. code-block:: shell
+
+ salt \* state.sls_id influxdb_query_delete_h2o_quality influxdb.query
+
+
+InfluxDB relay with HTTP outputs:
+
+.. code-block:: yaml
+
+ influxdb:
+ relay:
+ enabled: true
+ telemetry:
+ enabled: true
+ bind:
+ address: 127.0.0.1
+ port: 9196
+ listen:
+ http_backend:
+ type: http
+ bind:
+ address: 127.0.0.1
+ port: 9096
+ output:
+ server1:
+ location: http://server1:8086/write
+ timeout: 20s
+ buffer_size_mb: 512
+ max_batch_kb: 1024
+ max_delay_interval: 30s
+ server2:
+ location: http://server2:8086/write
+
Read more
=========