mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 02:02:50 +01:00
add agentstatus to telegraf
This commit is contained in:
@@ -56,6 +56,7 @@ so-telegraf:
|
|||||||
- /opt/so/log/raid:/var/log/raid:ro
|
- /opt/so/log/raid:/var/log/raid:ro
|
||||||
- /opt/so/log/sostatus:/var/log/sostatus:ro
|
- /opt/so/log/sostatus:/var/log/sostatus:ro
|
||||||
- /opt/so/log/salt:/var/log/salt:ro
|
- /opt/so/log/salt:/var/log/salt:ro
|
||||||
|
- /opt/so/log/agents:/var/log/agents:ro
|
||||||
{% if DOCKER.containers['so-telegraf'].custom_bind_mounts %}
|
{% if DOCKER.containers['so-telegraf'].custom_bind_mounts %}
|
||||||
{% for BIND in DOCKER.containers['so-telegraf'].custom_bind_mounts %}
|
{% for BIND in DOCKER.containers['so-telegraf'].custom_bind_mounts %}
|
||||||
- {{ BIND }}
|
- {{ BIND }}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
# if this script isn't already running
|
# if this script isn't already running
|
||||||
if [[ ! "`pidof -x $(basename $0) -o %PPID`" ]]; then
|
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 ',')
|
ONLINE=$(cat $LOGFILE | grep -wF online | awk '{print $2}' | tr -d ',')
|
||||||
ERROR=$(cat $LOGFILE | grep -wF error | 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 ',')
|
INACTIVE=$(cat $LOGFILE | grep -wF inactive | awk '{print $2}' | tr -d ',')
|
||||||
|
|||||||
Reference in New Issue
Block a user