Monitoring with M/Monit on OpenBSD


You may have already seen my Running Monit v5 on OpenBSD article. If not, it’s the correct time to have a look at it :)

This article will describe how to install and run M/Monit. Quoting its Web site, “M/Monit expand upon Monit’s capabilities to provide monitoring and management of all Monit enabled hosts from one easy to use web-interface”. Monit has an efficient Web interface, M/Monit has a shinning one. It also has reports abilities that will please your IT CEO ;-)

I’ll show how to run both on a single OpenBSD box.

First of all, install, configure and run Munin on OpenBSD or wherever you run services. Then, go for M/Monit:

# ftp
# tar xzf mmonit-2.3.4-openbsd-x64.tar.gz -C /home
# mv /home/mmonit-2.3.4 /home/mmonit
# cat > /home/mmonit/bin/
LD_LIBRARY_PATH="/home/mmonit/lib" \
        /home/mmonit/bin/mmonit "$@"
# chmod 755 /home/mmonit/bin/
# ln -s /usr/lib/ /home/mmonit/lib/
# ln -s /usr/lib/ /home/mmonit/lib/
# vi /etc/rc.local
if [ -x /home/mmonit/bin/ ]; then
        echo -n ' m/monit'; /home/mmonit/bin/ >/dev/null 2>&1
# /home/mmonit/bin/

Browse port 8080 of your M/Monit host and log-in using the “admin/swordfish” credentials.

Browse to “/admin/users/edit?uname=admin” and change the admin password.

Browse to “/admin/users/edit?uname=monit” and change the monit password.

Link both Monit and M/Monit instances:

# vi /home/monit/conf/monitrc
set eventqueue basedir /home/monit/var/
set mmonit http://monit:password@
# /home/monit/bin/ reload
Reinitializing monit daemon

On the M/Monit webpage, browse to “/status/” and check that your Monit hosts register.

M/Monit is not free :( but the trial licence will last 30 days ; that should be enough time to decide wether you like/need M/Monit or not.

That’s All Folks!

Source: M/MONIT User Manual