[munin/*] Plein de plugins munin qui n'étaient pas trackés

This commit is contained in:
Vincent Le Gallic 2013-03-03 08:19:25 +01:00
parent fcc2fef9b0
commit b55129ef17
9 changed files with 1031 additions and 0 deletions

33
munin/wiki_users.new Executable file
View file

@ -0,0 +1,33 @@
#!/bin/bash
if [ "$1" = "config" ]; then
echo 'host_name web.rouge'
echo 'graph_category wiki'
echo 'graph_title Utilisateurs wiki'
echo 'graph_args --base 1000 --lower-limit 0'
echo "graph_vlabel nombre d'utilisateurs"
echo 'enregistres.label Nb enregistrés'
echo 'enregistres.draw AREA'
echo 'favoris.label Nb avec favoris'
exit 0
fi
wikinoms=( $(grep -h -i -E '^name=' /var/local/wiki/data/user/* | sed 's/name=//g') )
wikipages=0
for nom in $(seq 0 $((${#wikinoms[@]} - 1)))
do
echo "/var/local/wiki/data/pages/${wikinom[$nom]}"
if [ -e "/var/local/wiki/data/pages/$nom" ]
then
echo $nom
let "wikipages+=1"
fi
done
echo $wikipages
echo "enregistres.value" `ls /var/local/wiki/data/user/ | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | wc -l`
echo "favoris.value" `ls /var/local/wiki/data/user/ | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.bookmark$' | wc -l`