[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Update status as heartbeat in external database.

From: Neelesh Pateriya
Subject: Update status as heartbeat in external database.
Date: Thu, 1 Nov 2012 23:00:49 -0700


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/
    if  does not exist then exec "/bin/bash -c '/etc/init.d/cron restart; restarting' " ELSE IF SUCCEEDED then exec "/bin/bash -c ' restarted'"
    if uptime > 1 minutes then   exec "/bin/bash -c ' 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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]