mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
31 lines
604 B
Plaintext
31 lines
604 B
Plaintext
|
#!/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
|