O
O
oni__ino2015-11-05 18:47:49
Debian
oni__ino, 2015-11-05 18:47:49

How to manage monit on systems with systemd, like the new debian 8?

Given: Debian 8, Monit
Need to manage services via systemd
[email protected]: cat /etc/monit/conf.d/*

set httpd port XXX
  allow admin:********
check process openvpn
  matching "openvpn"
  start program = "/etc/init.d/openvpn start"
  stop program = "/etc/init.d/openvpn stop"
  if failed host 127.0.0.1 port XXX then restart
  if 5 restarts within 5 cycles then timeout

With the indication in the control configs through init.d, everything works, but none of the options for writing systemctl, systemd, service does not work
[email protected]: /etc/openvpn# monit validate
/etc/monit/conf.d/openvpn.cfg:3: Program does not exist: 'systemctl'
/etc/monit/conf.d/openvpn.cfg:4: Program does not exist: 'systemctl'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2015-11-05
@oni__ino

start program = "/bin/systemctl start openvpn.service"
stop program = "/bin/systemctl stop openvpn.service"
not?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question