add agentstatus to telegraf

This commit is contained in:
Mike Reeves
2024-04-03 09:43:55 -04:00
parent 0dfde3c9f2
commit 513273c8c3
2 changed files with 2 additions and 1 deletions

View File

@@ -10,7 +10,7 @@
# if this script isn't already running
if [[ ! "`pidof -x $(basename $0) -o %PPID`" ]]; then
LOGFILE=$(cat /opt/so/log/agents/agentstatus.log)
LOGFILE=$(cat /var/log/agents/agentstatus.log)
ONLINE=$(cat $LOGFILE | grep -wF online | awk '{print $2}' | tr -d ',')
ERROR=$(cat $LOGFILE | grep -wF error | awk '{print $2}' | tr -d ',')
INACTIVE=$(cat $LOGFILE | grep -wF inactive | awk '{print $2}' | tr -d ',')