From d1155a8a4ef1cba93238df72a199f632b41be08c Mon Sep 17 00:00:00 2001 From: Michel Blockelet Date: Mon, 30 Mar 2009 15:19:29 +0200 Subject: [PATCH] [munin/innd_*] Import initial de innd_connects, headers darcs-hash:20090330131929-ddb99-9ce435a88e4c79481ad3ed5618d0f389b0851209.gz --- munin/innd_connects | 41 +++++++++++++++++++++++++++++++++++++++++ munin/innd_last | 23 +++++++++++++++++++++++ munin/innd_total | 2 +- 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100755 munin/innd_connects diff --git a/munin/innd_connects b/munin/innd_connects new file mode 100755 index 00000000..e88ab69c --- /dev/null +++ b/munin/innd_connects @@ -0,0 +1,41 @@ +#!/bin/sh +# -*- coding: utf-8 -*- + +# Copyright (C) 2009 Michel Blockelet + +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. + + +### Plugin munin de comptabilisation des connexions + + +## 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 "graph_period minute" + echo "graph_category News" + echo "connects.label connexions" + echo "connects.type DERIVE" + exit 0 +fi + +## 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 diff --git a/munin/innd_last b/munin/innd_last index 9188dd77..6615fd26 100755 --- a/munin/innd_last +++ b/munin/innd_last @@ -1,5 +1,27 @@ #!/bin/sh +# -*- coding: utf-8 -*- +# Copyright (C) 2009 Michel Blockelet + +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. + + +### Plugin munin de comptabilisation des posts de moins de 24h + + +## Configuration if [ "$1" = "config" ]; then echo 'host_name news.crans.org' echo 'graph_title Posts de moins de 24h' @@ -10,6 +32,7 @@ if [ "$1" = "config" ]; then exit 0 fi +## Sortie TMPFILE="/tmp/munin_innd_last" zcat -f /var/log/news/OLD/news.notice.3.gz /var/log/news/OLD/news.notice.2.gz /var/log/news/OLD/news.notice.1.gz /var/log/news/news.notice | grep "post ok" > $TMPFILE diff --git a/munin/innd_total b/munin/innd_total index 345b16fa..228a6296 100755 --- a/munin/innd_total +++ b/munin/innd_total @@ -17,7 +17,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. -"""Plugin munin pour innd.""" +"""Plugin munin pour innd :: donne le nombre total de posts par newsgroup.""" ## Importations import socket, sys, time