Hi,

I am planning update status of process in an external database. I am
working on config file that looks like

check process crond with pidfile /var/run/crond.pid
    if  does not exist then exec "/bin/bash -c '/etc/init.d/cron restart;
update_external_db.sh restarting' " ELSE IF SUCCEEDED then exec "/bin/bash
-c 'update_external_db.sh restarted'"
    if uptime > 1 minutes then   exec "/bin/bash -c 'update_external_db.sh
running' "

It seems to be working fine.
   If process stopped and not running     --> Status is updated to
restarting.
   Once process restarted successfully  --> Status is updated to restarted.
   If process is up                                  --> Periadically
status is updated to running.

This works fine. But only issue is because of uptime > 1 minutes check,
status of process always remain as " Uptime failed"

Is there any alternative approach so that we can periodically update status
and status of process is also running?

Thanks,
NP
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to