Core Module - Start Tracking InfluxDB size in telegraf

This commit is contained in:
Mike Reeves
2018-12-04 20:49:26 -05:00
parent 00e57d9b03
commit 9a61c460b4
2 changed files with 9 additions and 2 deletions

View File

@@ -620,7 +620,8 @@
{% if grains['role'] == 'so-master' %}
[[inputs.exec]]
commands = [
"/scripts/redis.sh"
"/scripts/redis.sh",
"/scripts/influxdbsize.sh"
]
data_format = "influx"
{% elif grains['role'] == 'so-SENSOR' %}
@@ -642,7 +643,8 @@
"/scripts/suriloss.sh",
"/scripts/checkfiles.sh",
"/scripts/broloss.sh",
"/scripts/oldpcap.sh"
"/scripts/oldpcap.sh",
"/scripts/influxdbsize.sh"
]
data_format = "influx"
{% endif %}

View File

@@ -0,0 +1,5 @@
#!/bin/bash
INFLUXSIZE=$(du -s -B1 /host/nsm/influxdb | awk {'print $1'}
echo "influxsize bytes=$INFLUXSIZE"