Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Elastic Agent Status Metrics #12734

Merged
merged 10 commits into from
Apr 3, 2024
Prev Previous commit
Next Next commit
add agentstatus to telegraf
  • Loading branch information
TOoSmOotH committed Apr 3, 2024
commit 64748b98adf4bdf32a17a2069487d7686c842ea1
2 changes: 1 addition & 1 deletion salt/telegraf/scripts/agentstatus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# if this script isn't already running
if [[ ! "`pidof -x $(basename $0) -o %PPID`" ]]; then

LOGFILE=$(/var/log/agents/agentstatus.log)
LOGFILE=/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 ',')
Expand Down