mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
generate measurement list and cq for each
This commit is contained in:
@@ -11,3 +11,7 @@ influxdb:
|
|||||||
downsample:
|
downsample:
|
||||||
so_long_term:
|
so_long_term:
|
||||||
resolution: 5m
|
resolution: 5m
|
||||||
|
measurements:
|
||||||
|
{% for measurement in salt['cmd.run']('docker exec -t so-influxdb /bin/bash -c "influx -format json -ssl -unsafeSsl -database telegraf -execute \"show measurements\"" | jq -r ".results[0].series[0].values[][0]"') %}
|
||||||
|
- {{ measurement }}
|
||||||
|
{% endfor %}
|
||||||
|
|||||||
@@ -113,11 +113,12 @@ telegraf_database:
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% for dest_rp in influxdb.downsample.keys() %}
|
{% for dest_rp in influxdb.downsample.keys() %}
|
||||||
so_downsample_cq:
|
{% for measurement in influxdb.downsample[dest_rp].measurements %}
|
||||||
|
so_downsample_{{measurement}}_cq:
|
||||||
influxdb_continuous_query.present:
|
influxdb_continuous_query.present:
|
||||||
- name: so_downsample_cq
|
- name: so_downsample_{{measurement}}_cq
|
||||||
- database: telegraf
|
- database: telegraf
|
||||||
- query: SELECT mean(*) INTO "{{dest_rp}}".:MEASUREMENT FROM /.*/ GROUP BY time({{influxdb.downsample[dest_rp].resolution}}),*
|
- query: SELECT mean(*) INTO "{{dest_rp}}"."{{measurement}}" FROM "{{measurement}}" GROUP BY time({{influxdb.downsample[dest_rp].resolution}})
|
||||||
- ssl: True
|
- ssl: True
|
||||||
- verify_ssl: /etc/pki/ca.crt
|
- verify_ssl: /etc/pki/ca.crt
|
||||||
- cert: ['/etc/pki/influxdb.crt', '/etc/pki/influxdb.key']
|
- cert: ['/etc/pki/influxdb.crt', '/etc/pki/influxdb.key']
|
||||||
@@ -126,7 +127,7 @@ so_downsample_cq:
|
|||||||
- docker_container: so-influxdb
|
- docker_container: so-influxdb
|
||||||
- influxdb_database: telegraf_database
|
- influxdb_database: telegraf_database
|
||||||
- file: influxdb_continuous_query.present_patch
|
- file: influxdb_continuous_query.present_patch
|
||||||
- sls: salt.python3-influxdb
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user