Network & Systems Architect

Welcome to my little blog. I am mostly techie over here, blogging about networking and system administration topics, but there will also be some Travel Reports from time to time…

How to Check services and restart using Monit

March 27, 2011Christian Kildau1 Comment

I have a monitoring service (Zabbix) which dies every few weeks, because it’s MySQL tables were locked for too long during a backup… Annoying! mostly because it’s then dead unnoticed for not just a few minutes. So, how do you monitor a monitoring service? Or simply… How do you restart any service that has just gone away in a simple way?

I recently came across monit. They state it’s up and running in just 15min. I got it faster

# Daemonize and check every 2mins.
set daemon  120

# Mail settings, in case you want to receive notifications
set mailserver
set mail-format { from: }
set alert

# The first check
check process zabbix_server with pidfile /var/run/zabbix/
        start program = "/etc/init.d/zabbix-server start"
        stop program = "/etc/init.d/zabbix-server stop"
        group server

You can also monitor network availability, application availability, file permissions and system utilization…
I think this tool is really great for a small network, though I don’t think it would scale that well. Just give it a try.

This article has one Comment
  1. Console

    Thank you. Zabbix server very often fall at last time.

Leave a Reply

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.