Commit 4224fa69 authored by Vincent Le gallic's avatar Vincent Le gallic

[munin/who] Un plugin munin esseulé

parent 2c216365
#!/bin/zsh
# Monitoring du nombre de sessions ssh ouvertes
# sur la machine
if [ "$1" = "autoconfig" ]; then
echo "yes"
elif [ "$1" = "config" ]; then
echo "graph_title Connexions ssh"
echo "graph_args --base 1000 -l 0"
echo "total.label Nombre de connexions ouvertes"
echo "total.draw AREA"
echo "uniq.label Nombre de personnes connectés"
echo "uniq.draw AREA"
else
who=$(/usr/bin/who | cut -d' ' -f1)
echo "total.value $(echo $who | wc -l)"
echo "uniq.value $(echo $who | sort | uniq | wc -l)"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment