[munin/innd_*] Connexions crans/exterieur, tabs

darcs-hash:20090330145223-ddb99-e5be7f6978efc83096afa15f8976432d36175c77.gz
This commit is contained in:
Michel Blockelet 2009-03-30 16:52:23 +02:00
parent af958a23d6
commit 26c25d26f7
2 changed files with 30 additions and 14 deletions

View file

@ -30,13 +30,29 @@ if [ "$1" = "config" ]; then
echo "graph_period minute" echo "graph_period minute"
echo "graph_category News" echo "graph_category News"
echo "graph_info Affiche le nombre de connexions par minute à InnD." echo "graph_info Affiche le nombre de connexions par minute à InnD."
echo "connects.label connexions" echo "connects.label Total"
echo "connects.type DERIVE" echo "connects.type DERIVE"
echo "crans.label crans"
echo "crans.type DERIVE"
echo "crans.draw AREA"
echo "ext.label exterieur"
echo "ext.type DERIVE"
echo "ext.draw STACK"
exit 0 exit 0
fi fi
TMPFILE=/tmp/munin_innd_connects_grep
## Sortie ## Sortie
echo -n "connects.value "
# Bon, ça fera une valeur négative (ramenée à 0 par le --lower-limit) # Bon, ça fera une valeur négative (ramenée à 0 par le --lower-limit)
# à chaque rotation des logs, mais bon ... # à chaque rotation des logs, mais bon ...
egrep "connect$" /var/log/news/news.notice | wc -l egrep "connect$" /var/log/news/news.notice > $TMPFILE
echo -n "connects.value "
cat $TMPFILE | wc -l
echo -n "crans.value "
cat $TMPFILE | egrep '\.crans\.org \(138\.231.*\) connect$' | wc -l
echo -n "ext.value "
cat $TMPFILE | egrep -v '\.crans\.org \(138\.231.*\) connect$' | wc -l
rm -f $TMPFILE &> /dev/null