Here are the steps that I used to install munin:
- Create user and group 'munin'
- run 'make install-main'
- create a cron entry for user munin that runs '/opt/munin/bin/munin-cron' every 5 minutes
- run 'make install-doc install-man'
- run 'make install-node install-node-plugins'
- run 'munin-node-configure --shell | sh'
- create the following init script
- !/bin/sh
#
# munin This shell script takes care of starting and stopping
# munin.
#
# chkconfig: - 96 29
# description: munin is a script that keeps track of process on different servers
# processname: munin-node
# config: /root/.fetchmailrc
# Source function library.
. /etc/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
munin=/opt/munin/sbin/munin-node
function start() {
# Start daemons.
echo -n "munin:"
/opt/munin/sbin/munin-node
RETVAL=$?
}
function stop() {
# Stop daemons.
echo -n "Shutting down munin: "
killall munin-node
RETVAL=$?
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
;;
*)
echo "Usage: $0 start|stop|restart}"
RETVAL=1
esac
exit $RETVAL - copy the plugin.conf to /etc/opt/munin/plugin-conf.d/
- Modify /opt/munin/lib/plugins/postfix_mailstats /opt/munin/lib/plugins/postfix_mailvolume so LOGFILE is "maillog"
- Create a sym link for postfix_mailstats and postfix_mailvolume into /etc/opt/munin/plugins
- run /etc/init.d/munin start
No comments:
Post a Comment