Monitor with Monit

A few days ago I posted a message about creating a pid file for linbpq. So that it becomes possible to monitor the process with watchdog.

You can read that here.

Now I use Monit to display this graphically. Why, because it looks nice. Now you immediately have an overview of running processes and their status.

The configuration file that I use for this.

/etc/monit/monitrc

Watchdog

I use watchdog to monitor my RPI. Do services go offline or the RPI is not responding, watchdog kicks in and restart the system. Now I also want watchdog to watch my Linbpq. This is possible with watchdog, watchdog looks at a PID file. As far as I know, no PID file is created when starting Linbpq.

Now there is a possibility that when starting Linbpq with systemd a command can be given so that a PID file is created.

This is my linbpq.service file from systemd

This command creates a linbpq.pid file, now it is possible that watchdog monitors linbpq.

At the end of my watchdog configuration file (/etc/watchdog.conf) I have added the following line.

Take a look at what happens when you stop Linbpq.

Yes the system is ReBoOtInG (I hoop)