2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Initial version

This commit is contained in:
Paul Mansfield 2009-12-17 18:25:33 +01:00 committed by Steve Schnepp
parent b778144727
commit 4fc3fde78b

30
plugins/other/log_sizes Executable file
View File

@ -0,0 +1,30 @@
#!/bin/sh
#H=`echo $0 | awk -F_ '{print $2}'`
#LOGFILES=`ls /var/log/messages /var/log/syslog /var/log/daemon.log /myapplication/logs/*.log`
LOGFILES="/var/log/messages /var/log/syslog /var/log/daemon.log"
if [ "$1" = "config" ] ; then
echo "graph_title log sizes"
echo "graph_category disk"
echo "graph_info this graph shows sizes of log files"
echo "graph_vlabel size (bytes)"
for F in $LOGFILES
do
MF=`echo $F | sed 's/[-\/\.]/_/g'`
echo "$MF.label $F"
done
else
for F in $LOGFILES
do
MF=`echo $F | sed 's/[-\/\.]/_/g'`
echo -n "$MF.value "
stat --printf="%s\n" $F
done
fi