-1

We are running rabbitmq, redis and celery on a Debian wheezy (oldstable) linux server. all of them are installed as init.d scripts and started at boot time. we would like to keep an eye on them and get email alerts, if any of them goes down.

I have checked tools such as supervisord and runit. but, both of them seem to require the monitored process to be NOT daemons.

How to get this done? are there are other tools that get the job done? Pls. advise.

umläute
  • 28,885
  • 9
  • 68
  • 122
tagsense
  • 81
  • 2
  • 8
  • if you are running *Debian/wheezy* (as mentioned in the comment fo rsm's answer), you shouldn't call it *stable* (as it is no longer *stable* but *oldstable*, and this will change again). Better use unambiguous codenames (like *wheezy*) – umläute Jul 06 '15 at 08:21
  • check https://immortal.run probably can help – nbari Oct 29 '17 at 19:08

2 Answers2

1

I'm not an expert of this but since Debian Jessie daemons are managed by systemd, I'd recommend you to use sytemd instead of init.d, and then use systemctl to keep an eye over your daemons. I find that systemctl is great for monitoring, and probably there are even more tools on systemd for doing this.

To finish responding your question, by using systemctl status <daemon> you can know the status of a daemon, and I think that it also works for init.d scripts.

rsm@matrice:~$ systemctl status alienware-kbl
● alienware-kbl.service - alienware-kbl daemon
   Loaded: loaded (/usr/lib/systemd/system/alienware-kbl.service; enabled)
   Active: active (running) since Sat 2015-07-04 10:30:17 CEST; 3h 7min ago
 Main PID: 1024 (alienware-kbl)
   CGroup: /system.slice/alienware-kbl.service
           ├─1024 /bin/bash /usr/bin/alienware-kbl --start-daemon
           └─1029 /usr/bin/python2.7 /usr/share/alienware-kbl/Daemon.py --start-daemon

As a new/newbie programmer I find that making daemons over systemd is much easier than over init.d

  • we are running Debian Wheezy (the previous stable version) and systemd has to be added separately. since this is a production server, we need to carefully migrate from init to systemd. will check. – tagsense Jul 05 '15 at 03:35
0

Based on rsm's suggestion, we have created a simple tool called daemonsitter to watch over Systemd daemons. We have released this as an open source under apache license on github (https://github.com/dataglen/daemonsitter.git).

tagsense
  • 81
  • 2
  • 8