From afc5dd6c7a55eae811d0cad4c9bc49fc7a8ac73d Mon Sep 17 00:00:00 2001 From: samuel-p Date: Sun, 16 May 2021 16:33:25 +0200 Subject: [PATCH] fixed active-sessions.sh --- node_exporter/active-sessions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node_exporter/active-sessions.sh b/node_exporter/active-sessions.sh index 854d78c..c77910f 100644 --- a/node_exporter/active-sessions.sh +++ b/node_exporter/active-sessions.sh @@ -1,7 +1,7 @@ #!/bin/bash -ALL_SESSIONS=$(ps auxwww | grep sshd: | grep -v grep -c) -ROOT_SESSIONS=$(ps auxwww | grep sshd: | grep -v grep | grep 'root\|priv' -c) +ALL_SESSIONS=$(ps auxwww | grep sshd: | grep -v 'grep\|listen' -c) +ROOT_SESSIONS=$(ps auxwww | grep sshd: | grep -v 'grep\|listen' | grep 'root\|priv' -c) echo "# HELP node_active_sessions active sessions by type." echo "# TYPE node_active_sessions gauge"