From 26c25d26f74b47c6809a7e9869ff612411745c27 Mon Sep 17 00:00:00 2001 From: Michel Blockelet Date: Mon, 30 Mar 2009 16:52:23 +0200 Subject: [PATCH] [munin/innd_*] Connexions crans/exterieur, tabs darcs-hash:20090330145223-ddb99-e5be7f6978efc83096afa15f8976432d36175c77.gz --- munin/innd_connects | 32 ++++++++++++++++++++++++-------- munin/innd_last | 12 ++++++------ 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/munin/innd_connects b/munin/innd_connects index 5cbe32ff..3030a810 100755 --- a/munin/innd_connects +++ b/munin/innd_connects @@ -23,20 +23,36 @@ ## Configuration if [ "$1" = "config" ]; then - echo 'host_name news.crans.org' - echo 'graph_title Connexions par minute' - echo "graph_args --base 1000 --lower-limit 0" - echo "graph_vlabel connexions" + echo 'host_name news.crans.org' + echo 'graph_title Connexions par minute' + echo "graph_args --base 1000 --lower-limit 0" + echo "graph_vlabel connexions" echo "graph_period minute" echo "graph_category News" echo "graph_info Affiche le nombre de connexions par minute à InnD." - echo "connects.label connexions" + echo "connects.label Total" echo "connects.type DERIVE" - exit 0 + 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 fi +TMPFILE=/tmp/munin_innd_connects_grep + ## Sortie -echo -n "connects.value " # Bon, ça fera une valeur négative (ramenée à 0 par le --lower-limit) # à 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 diff --git a/munin/innd_last b/munin/innd_last index d00b9c93..d16be586 100755 --- a/munin/innd_last +++ b/munin/innd_last @@ -23,14 +23,14 @@ ## Configuration if [ "$1" = "config" ]; then - echo 'host_name news.crans.org' - echo 'graph_title Posts de moins de 24h' - echo "graph_args --base 1000 --lower-limit 0" - echo "graph_vlabel posts" + echo 'host_name news.crans.org' + echo 'graph_title Posts de moins de 24h' + echo "graph_args --base 1000 --lower-limit 0" + echo "graph_vlabel posts" echo "graph_category News" echo "graph_info Affiche le nombre de posts de moins de 24h." - echo "posts.label posts" - exit 0 + echo "posts.label posts" + exit 0 fi ## Sortie