scripts that log content with telegraf so we can show it in grafana. These run on the host as they need access to logs/content that is underneath the containers
This commit is contained in:
16
telegraf-watchtower-enabled
Executable file
16
telegraf-watchtower-enabled
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# an update, BUT, as prometheus is just looking at the last state of the file,
|
||||
# it would see the last values and think they are 'current'.
|
||||
#
|
||||
# SO, lets date 'stamp' when we ran this, rather than give a boolean, because if
|
||||
# its running this will update the date, if not, it wont anyway :)
|
||||
|
||||
log_file=/srv/docker/container/telegraf/monitoring-results/watchtower-enabled.influx
|
||||
cnt=`egrep -v '^#' /srv/docker/config/docker-compose.yml | grep -c com.centurylinklabs.watchtower.enable`
|
||||
|
||||
tstamp=`date +%s%N`
|
||||
# using influx format
|
||||
echo mara_watchtower_enabled count=$cnt $tstamp > $log_file
|
||||
|
||||
Reference in New Issue
Block a user