mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-26 10:58:12 +00:00
Initial version
This commit is contained in:
parent
b778144727
commit
4fc3fde78b
1 changed files with 30 additions and 0 deletions
30
plugins/other/log_sizes
Executable file
30
plugins/other/log_sizes
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue