mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 18:38:30 +00:00
Initial version
This commit is contained in:
parent
5aa52c2fae
commit
7d2b0ea2e1
1 changed files with 43 additions and 0 deletions
43
plugins/other/yum_activity
Executable file
43
plugins/other/yum_activity
Executable file
|
@ -0,0 +1,43 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Plugin to monitor yum update activity
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
#
|
||||||
|
# config
|
||||||
|
# autoconf
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$1" = "autoconf" ]; then
|
||||||
|
if [ -r /var/log/yum.log ]; then
|
||||||
|
echo yes
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "no (/var/log/yum.log not readable)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "config" ]; then
|
||||||
|
|
||||||
|
echo 'graph_title Yum Activity'
|
||||||
|
echo 'graph_args --base 1000 -l 0 '
|
||||||
|
echo 'graph_vlabel Yum Activity'
|
||||||
|
echo 'updates.label Yum Updated'
|
||||||
|
echo 'updates.draw AREA'
|
||||||
|
echo 'installed.label Yum Installed'
|
||||||
|
echo 'installed.draw AREA'
|
||||||
|
echo 'erased.label Yum Erased'
|
||||||
|
echo 'erased.draw AREA'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "updates.value "
|
||||||
|
grep "`date "+%b %d"`" /var/log/yum.log | grep -ci Updated
|
||||||
|
|
||||||
|
echo -n "installed.value "
|
||||||
|
grep "`date "+%b %d"`" /var/log/yum.log | grep -ci Installed
|
||||||
|
|
||||||
|
echo -n "erased.value "
|
||||||
|
grep "`date "+%b %d"`" /var/log/yum.log | grep -ci Erased
|
Loading…
Add table
Add a link
Reference in a new issue