[munin/who] Un plugin munin esseulé
This commit is contained in:
parent
2c21636554
commit
4224fa69ec
1 changed files with 21 additions and 0 deletions
21
munin/who
Executable file
21
munin/who
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue