Hi,

the pid change rule most probably won't do the trick, since it is
executed only when the service is running, but pid changed out of monit control. You should add the freeradius monitoring enable/disable to postgres startup script and set the freeradius monitoring mode to manual.

Martin



Barry wrote:
Hallo List

I’ve installed monit 4.8.1 on my ubuntu server and here is my control file:

check process freerad with pidfile /var/run/freeradius/freeradius.pid

        start program = "/etc/init.d/freeradius start"

        stop program = "/etc/init.d/freeradius stop"

        if changed pid then restart

        depends on postgres

check process postgres with pidfile /var/run/postgresql/8.2-main.pid

        if changed pid then unmonitor

        if failed port 5432 protocol pgsql then unmonitor

What I am trying to achieve is that freeradius is only monitored while postgres is running.

When postgres is stopped, freeradius monitoring should also stop and when postgres is started, freeradius monitoring should start.

The above config keeps on restarting freeradius whether postgres is running or not.

Any help will be appreciated.

Kind regards

Barry


------------------------------------------------------------------------

--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to