mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #12741 from Security-Onion-Solutions/metrics
Change code to allow for non root
This commit is contained in:
@@ -249,8 +249,11 @@ get_random_value() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get_agent_count() {
|
get_agent_count() {
|
||||||
|
if [ -f /opt/so/log/agents/agentstatus.log ]; then
|
||||||
AGENTCOUNT=$(/usr/sbin/so-elasticagent-status | grep -wF active | awk '{print $2}')
|
AGENTCOUNT=$(cat /opt/so/log/agents/agentstatus.log | grep -wF active | awk '{print $2}')
|
||||||
|
else
|
||||||
|
AGENTCOUNT=0
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
gpg_rpm_import() {
|
gpg_rpm_import() {
|
||||||
|
|||||||
Reference in New Issue
Block a user