updated node_exporter scripts
This commit is contained in:
parent
c395134a75
commit
52764e5bed
5 changed files with 42 additions and 12 deletions
9
node_exporter/active-sessions.sh
Normal file
9
node_exporter/active-sessions.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
ALL_SESSIONS=$(who | wc -l)
|
||||
ROOT_SESSIONS=$(who | grep root | wc -l)
|
||||
|
||||
echo "# HELP node_active_sessions active sessions by type."
|
||||
echo "# TYPE node_active_sessions gauge"
|
||||
echo "node_active_sessions{type=\"all\"} $ALL_SESSIONS"
|
||||
echo "node_active_sessions{type=\"root\"} $ROOT_SESSIONS"
|
Reference in a new issue