updated node_exporter scripts

This commit is contained in:
Samuel Philipp 2021-05-16 00:27:56 +02:00
parent c395134a75
commit 52764e5bed
Signed by: samuel-p
GPG key ID: 2AD495D17760CB4E
5 changed files with 42 additions and 12 deletions

View 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"