Go to All Forums

How does the Cron Monitor actually alert when there's a problem?

I'd like to add Cron Monitoring alert.
To test the feature, I added the following line to the server's crontab:

* * * * * curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/start' && /home/ronba_admin/bash/cron_test.sh && curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/end'

Where ` /home/ronba_admin/bash/cron_test.sh` includes just the `date` command.

However, I don't understand how I should be alerted by site24x7.

I moved cron_test.sh to a different directory, and the cron monitor screen looks exactly the same with a valid and invalid script in the crontab line.

Like (2) Reply
Replies (12)

Attached are screenshots of the server (colo-apps-lp1) Summary and Setup

 

Like (0) Reply

Hi Ron,

We monitor the crons with the start and end ping we receive through the http urls. In your cron command,

* * * * * curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/start' && /home/ronba_admin/bash/cron_test.sh && curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/end'

the start ping commands indicates site24x7 servers that the job has started. When the file was present, it will execute the command and move to execute the end ping url, which will indicate the job is completed and will be logged in the log report.

As && is used between the commands, while executing the cron when the file is not available, the end ping will not be received and will not be logged in the log report. 

We will check for the feasibility add the feature in the threshold profile to alert when the end ping is not received, that will solve your usecase.

As a workaround, instead of pinging the Site24x7 servers before the file execution, you can move the curl commands within the script with the start-ping command in the beginning and the end-ping command as the last line of the script to make sure the commands will be executed only when the script is executed, and the cronmonitor will be notified as down when the start ping is not received.  

You can configure this threshold setting by navigating to cron monitor details page -> Click on hamburger icon -> Edit  -> Threshold and Availability -> Click on pencil icon -> Alert me if Job does not start on schedule -> Trouble/Down

PFA of the cronmonitor threshold profile.

Hope this helps!

Thanks

Anita

Attachments
edit-cron-threshold.png
Size: 33.18 KB
Like (0) Reply

Hi Anita,

My cronjob is:

* * * * * curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/start' && /home/ronba_admin/bash/cron_test.sh && curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/end'

Per your instructions, I set 

To test it, I renamed /home/ronba_admin/bash/cron_test.sh, so that the cron monitor will fail.

Where do I see this failure?

Like (0) Reply

Hi Ron,

* * * * * curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/start' && /home/ronba_admin/bash/cron_test.sh && curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/end'

will not alert in your case as we dont have a threshold option to alert if end ping is not received. We will add this to the feature roadmap.

Workaround:

Instead move the below apis within the script.

curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/start'

curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/end'

Hence your cron will look like

* * * * * /home/ronba_admin/bash/cron_test.sh

and your cron_test.sh will look like: 

curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/start'

//Your script logic goes here

curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/end'

After changing your cron & and your script, in the cron edit monitor details page which you have attached above, click on the pencil icon next to Threshold & Availability.

There you can configure status change for the monitor to Trouble/Down if start ping not received.

Thanks

Anita 

 

Attachments
cron-down-listing.png
Size: 300.65 KB
Like (0) Reply

Hi Anita,
I followed your suggestions.
-------------------------------------------------

My cronjob line looks like so:

[ronba_admin@colo-apps-lp1 ~]$ sudo crontab -l | tail -1
* * * * * /home/ronba_admin/bash/cron_test.sh

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

The script that the cronjob calls is:

[ronba_admin@colo-apps-lp1 ~]$ cat /home/ronba_admin/bash/cron_test.sh
# * * * * * curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/start' && /home/ronba_admin/bash/cron_test.sh && curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/end'

curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/start'
/usr/bin/date
curl -m 10 'plus.site24x7.com/cron/<apikey>/colo-apps-lp1/end'

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

The configuration of the cron monitor is:

zohodiscussions.com/viewFile.do?fileId=<fileid>&forumGroupURL=site24x7

zohodiscussions.com/viewFile.do?fileId=<fileid>&forumGroupURL=site24x7

I started running the above at around 10:00. Is what I'm seeing in zohodiscussions.com/viewFile.do?fileId=<fileid>&forumGroupURL=site24x7 what I should see when the cron monitor is defined correctly?

 

Like (0) Reply

Hi Ron,

Seems like all the configuration are done correctly. Can you please attach the log report which will be present in the bottom of the page, to address this further.

Thanks

Anita

Like (0) Reply

Hi Anita,
The 'Attach file' link below doesn't want to attach the log file (Log Report_2021-11-25_09-19.csv), so here are the log's contents:

[rbarak@yvr-rbarak-ld1 ~]$ cat /home/rbarak/Downloads/Log\ Report_2021-11-25_09-28.csv
Collection Time,Ping Type,IP Address,Reason
November 25 2021 9:28:01 PST,end,50.231.70.198,-
November 25 2021 9:28:01 PST,start,50.231.70.198,-
November 25 2021 9:27:02 PST,end,50.231.70.198,-
November 25 2021 9:27:01 PST,start,50.231.70.198,-
November 25 2021 9:26:02 PST,end,50.231.70.198,-
November 25 2021 9:26:01 PST,start,50.231.70.198,-
November 25 2021 9:25:01 PST,end,50.231.70.198,-
November 25 2021 9:25:01 PST,start,50.231.70.198,-
November 25 2021 9:24:01 PST,end,50.231.70.198,-
November 25 2021 9:24:01 PST,start,50.231.70.198,-
November 25 2021 9:23:02 PST,end,50.231.70.198,-
November 25 2021 9:23:02 PST,start,50.231.70.198,-
November 25 2021 9:22:01 PST,end,50.231.70.198,-
November 25 2021 9:22:01 PST,start,50.231.70.198,-
November 25 2021 9:21:02 PST,end,50.231.70.198,-
November 25 2021 9:21:01 PST,start,50.231.70.198,-
November 25 2021 9:20:02 PST,end,50.231.70.198,-
November 25 2021 9:20:01 PST,start,50.231.70.198,-
November 25 2021 9:19:02 PST,end,50.231.70.198,-
November 25 2021 9:19:02 PST,start,50.231.70.198,-
November 25 2021 9:18:01 PST,end,50.231.70.198,-
November 25 2021 9:18:01 PST,start,50.231.70.198,-
November 25 2021 9:17:02 PST,end,50.231.70.198,-
November 25 2021 9:17:01 PST,start,50.231.70.198,-
November 25 2021 9:16:02 PST,end,50.231.70.198,-
November 25 2021 9:16:02 PST,start,50.231.70.198,-
November 25 2021 9:15:02 PST,end,50.231.70.198,-
November 25 2021 9:15:01 PST,start,50.231.70.198,-
November 25 2021 9:14:02 PST,end,50.231.70.198,-
November 25 2021 9:14:02 PST,start,50.231.70.198,-
November 25 2021 9:13:01 PST,end,50.231.70.198,-
November 25 2021 9:13:01 PST,start,50.231.70.198,-
November 25 2021 9:12:02 PST,end,50.231.70.198,-
November 25 2021 9:12:01 PST,start,50.231.70.198,-
November 25 2021 9:11:01 PST,end,50.231.70.198,-
November 25 2021 9:11:01 PST,start,50.231.70.198,-
November 25 2021 9:10:02 PST,end,50.231.70.198,-
November 25 2021 9:10:01 PST,start,50.231.70.198,-
November 25 2021 9:09:02 PST,end,50.231.70.198,-
November 25 2021 9:09:02 PST,start,50.231.70.198,-
November 25 2021 9:08:01 PST,end,50.231.70.198,-
November 25 2021 9:08:01 PST,start,50.231.70.198,-
November 25 2021 9:07:02 PST,end,50.231.70.198,-
November 25 2021 9:07:01 PST,start,50.231.70.198,-
November 25 2021 9:06:02 PST,end,50.231.70.198,-
November 25 2021 9:06:02 PST,start,50.231.70.198,-
November 25 2021 9:05:01 PST,end,50.231.70.198,-
November 25 2021 9:05:01 PST,start,50.231.70.198,-
November 25 2021 9:04:02 PST,end,50.231.70.198,-
November 25 2021 9:04:01 PST,start,50.231.70.198,-
November 25 2021 9:03:02 PST,end,50.231.70.198,-
November 25 2021 9:03:02 PST,start,50.231.70.198,-
November 25 2021 9:02:01 PST,end,50.231.70.198,-
November 25 2021 9:02:01 PST,start,50.231.70.198,-
November 25 2021 9:01:02 PST,end,50.231.70.198,-
November 25 2021 9:01:01 PST,start,50.231.70.198,-
November 25 2021 9:00:02 PST,end,50.231.70.198,-
November 25 2021 9:00:01 PST,start,50.231.70.198,-
November 25 2021 8:59:02 PST,end,50.231.70.198,-
November 25 2021 8:59:01 PST,start,50.231.70.198,-
November 25 2021 8:58:02 PST,end,50.231.70.198,-
November 25 2021 8:58:02 PST,start,50.231.70.198,-
November 25 2021 8:57:02 PST,end,50.231.70.198,-
November 25 2021 8:57:02 PST,start,50.231.70.198,-
November 25 2021 8:56:01 PST,end,50.231.70.198,-
November 25 2021 8:56:01 PST,start,50.231.70.198,-
November 25 2021 8:55:03 PST,end,50.231.70.198,-
November 24 2021 7:43:02 PST,start,50.231.70.198,-
November 24 2021 7:42:02 PST,start,50.231.70.198,-
November 24 2021 7:41:02 PST,start,50.231.70.198,-
November 24 2021 7:40:02 PST,start,50.231.70.198,-
November 24 2021 7:39:02 PST,start,50.231.70.198,-
November 24 2021 7:38:02 PST,start,50.231.70.198,-
November 24 2021 7:37:02 PST,start,50.231.70.198,-
November 24 2021 7:36:02 PST,start,50.231.70.198,-
November 24 2021 7:35:02 PST,start,50.231.70.198,-
November 24 2021 7:34:02 PST,start,50.231.70.198,-
November 24 2021 7:33:02 PST,start,50.231.70.198,-
November 24 2021 7:32:02 PST,start,50.231.70.198,-
November 24 2021 7:31:01 PST,start,50.231.70.198,-
November 24 2021 7:30:02 PST,start,50.231.70.198,-
November 24 2021 7:29:02 PST,start,50.231.70.198,-
November 24 2021 7:28:02 PST,start,50.231.70.198,-
November 24 2021 7:27:02 PST,start,50.231.70.198,-
November 24 2021 7:26:02 PST,start,50.231.70.198,-
November 24 2021 7:25:02 PST,start,50.231.70.198,-
November 24 2021 7:24:02 PST,start,50.231.70.198,-
November 24 2021 7:23:02 PST,start,50.231.70.198,-
November 24 2021 7:22:02 PST,start,50.231.70.198,-
November 24 2021 7:21:01 PST,start,50.231.70.198,-
November 24 2021 7:20:02 PST,start,50.231.70.198,-
November 24 2021 7:19:02 PST,start,50.231.70.198,-
November 24 2021 7:18:02 PST,start,50.231.70.198,-
November 24 2021 7:17:01 PST,start,50.231.70.198,-
November 24 2021 7:16:01 PST,start,50.231.70.198,-
November 24 2021 7:15:02 PST,start,50.231.70.198,-
November 24 2021 7:15:02 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 7:14:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 7:13:59 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 7:13:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 7:12:57 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 7:12:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 7:11:56 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 7:11:01 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 7:10:54 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 7:10:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 7:09:52 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 7:09:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 7:08:49 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 7:08:01 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 7:07:47 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 7:07:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 7:06:46 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 7:06:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 7:05:44 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 7:05:01 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 7:04:39 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 7:04:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 7:03:36 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 7:03:01 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 7:02:33 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 7:02:01 PST,start,50.231.70.198,-
November 24 2021 7:01:02 PST,start,50.231.70.198,-
November 24 2021 7:00:02 PST,start,50.231.70.198,-
November 24 2021 6:59:02 PST,start,50.231.70.198,-
November 24 2021 6:58:02 PST,start,50.231.70.198,-
November 24 2021 6:57:02 PST,start,50.231.70.198,-
November 24 2021 6:56:02 PST,start,50.231.70.198,-
November 24 2021 6:55:02 PST,start,50.231.70.198,-
November 24 2021 6:54:01 PST,start,50.231.70.198,-
November 24 2021 6:53:01 PST,start,50.231.70.198,-
November 24 2021 6:52:02 PST,start,50.231.70.198,-
November 24 2021 6:51:02 PST,start,50.231.70.198,-
November 24 2021 6:50:02 PST,start,50.231.70.198,-
November 24 2021 6:49:02 PST,start,50.231.70.198,-
November 24 2021 6:48:02 PST,start,50.231.70.198,-
November 24 2021 6:47:02 PST,start,50.231.70.198,-
November 24 2021 6:46:02 PST,start,50.231.70.198,-
November 24 2021 6:45:02 PST,start,50.231.70.198,-
November 24 2021 6:44:02 PST,start,50.231.70.198,-
November 24 2021 6:43:02 PST,start,50.231.70.198,-
November 24 2021 6:42:02 PST,start,50.231.70.198,-
November 24 2021 6:41:02 PST,start,50.231.70.198,-
November 24 2021 6:40:02 PST,start,50.231.70.198,-
November 24 2021 6:39:02 PST,start,50.231.70.198,-
November 24 2021 6:38:02 PST,start,50.231.70.198,-
November 24 2021 6:37:01 PST,start,50.231.70.198,-
November 24 2021 6:36:02 PST,start,50.231.70.198,-
November 24 2021 6:35:02 PST,start,50.231.70.198,-
November 24 2021 6:34:02 PST,start,50.231.70.198,-
November 24 2021 6:33:02 PST,start,50.231.70.198,-
November 24 2021 6:32:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:32:02 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:31:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:31:00 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:30:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:29:59 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:29:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:28:56 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:28:01 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:27:55 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:27:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:26:53 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:26:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:25:52 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:25:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:24:51 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:24:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:23:49 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:23:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor is Up as /start ping was received.
November 24 2021 6:22:47 PST,Alert,-,colo-apps-lp1 -Cron Monitor is Down as /start ping was not received for the cron schedule */1 * * * *.
November 24 2021 6:21:45 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:21:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:20:43 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:20:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:19:42 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:19:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:18:41 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:18:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:17:39 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:17:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:16:37 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:16:01 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:15:35 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:15:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 6:14:33 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 6:14:02 PST,start,50.231.70.198,-
November 24 2021 6:13:02 PST,start,50.231.70.198,-
November 24 2021 6:12:02 PST,start,50.231.70.198,-
November 24 2021 6:11:02 PST,start,50.231.70.198,-
November 24 2021 6:10:02 PST,start,50.231.70.198,-
November 24 2021 6:09:01 PST,start,50.231.70.198,-
November 24 2021 0:40:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 0:39:34 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 0:39:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 0:38:33 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 0:38:02 PST,start,50.231.70.198,-
November 24 2021 0:37:02 PST,start,50.231.70.198,-
November 24 2021 0:36:01 PST,start,50.231.70.198,-
November 24 2021 0:35:02 PST,start,50.231.70.198,-
November 24 2021 0:34:01 PST,start,50.231.70.198,-
November 24 2021 0:33:02 PST,start,50.231.70.198,-
November 24 2021 0:32:02 PST,start,50.231.70.198,-
November 24 2021 0:31:02 PST,start,50.231.70.198,-
November 24 2021 0:30:02 PST,start,50.231.70.198,-
November 24 2021 0:29:02 PST,start,50.231.70.198,-
November 24 2021 0:28:02 PST,start,50.231.70.198,-
November 24 2021 0:27:02 PST,start,50.231.70.198,-
November 24 2021 0:26:02 PST,start,50.231.70.198,-
November 24 2021 0:25:02 PST,start,50.231.70.198,-
November 24 2021 0:24:02 PST,start,50.231.70.198,-
November 24 2021 0:23:01 PST,start,50.231.70.198,-
November 24 2021 0:22:02 PST,start,50.231.70.198,-
November 24 2021 0:21:02 PST,start,50.231.70.198,-
November 24 2021 0:20:02 PST,start,50.231.70.198,-
November 24 2021 0:19:02 PST,start,50.231.70.198,-
November 24 2021 0:18:02 PST,start,50.231.70.198,-
November 24 2021 0:17:02 PST,start,50.231.70.198,-
November 24 2021 0:16:02 PST,start,50.231.70.198,-
November 24 2021 0:15:02 PST,start,50.231.70.198,-
November 24 2021 0:14:02 PST,start,50.231.70.198,-
November 24 2021 0:13:02 PST,start,50.231.70.198,-
November 24 2021 0:12:02 PST,start,50.231.70.198,-
November 24 2021 0:11:02 PST,start,50.231.70.198,-
November 24 2021 0:10:02 PST,start,50.231.70.198,-
November 24 2021 0:09:01 PST,start,50.231.70.198,-
November 24 2021 0:08:02 PST,start,50.231.70.198,-
November 24 2021 0:07:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 0:07:00 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 0:06:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 0:05:58 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 0:05:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 0:04:57 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 0:04:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 0:03:55 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 0:03:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 0:02:53 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 0:02:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 0:01:52 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 0:01:01 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping
November 24 2021 0:00:49 PST,Alert,-,colo-apps-lp1 -Cron Monitor is in Trouble as /end ping is not received. Job is running for more than 30 seconds.
November 24 2021 0:00:02 PST,start,50.231.70.198,colo-apps-lp1 -Cron Monitor Status is changed to Up as it received a /start ping

Like (0) Reply

Hi Ron,

From the logs, we can see that we are receiving the start ping every min though you have configured to run the cron every 2 minutes. Because of that, you are not getting start ping not received alert. Instead you are getting end ping not received and job running for more than the configured time interval.

November 24 2021 0:11:02 PST,start,50.231.70.198,-
November 24 2021 0:10:02 PST,start,50.231.70.198,-
November 24 2021 0:09:01 PST,start,50.231.70.198,-
November 24 2021 0:08:02 PST,start,50.231.70.198,-

Can you please check if there are any other crons/scripts is hitting the start url for this monitor every minute?

Thanks

Anita

 

 

Like (0) Reply

Hi Anita,
After fixing the issue you pointed out, my GUI looks now like zohodiscussions.com/viewFile.do?fileId=18151000001737404&forumGroupURL=site24x7

So, even though I don't understand what I see (why is the graph always at 0 seconds, but there's a jump to 1 second at 11:04?).

Assuming there's an explanation, I'm ready now to implement the cron monitor on actual cron jobs.

Which raises another question.

There's only one 'Configured Cron Expression', but I have three cronjobs that I'd like to monitor  

*/15 * * * * puppet agent --onetime --no-daemonize --logdest syslog > /dev/null 2>&1
30 23 * * * /root/scm/scm-scripts/getAllFiles.sh
36 12 * * * /root/scm/inbox/getAllFilesSnallTest.sh >> /root/scm/inbox/scriptlog.log

So, how do I monitor all three cronjobs?

Like (0) Reply

Hi Ron,

You will have to create a cron monitor with their corresponding cron expressions and a unique name in site24x7 to get the start/end ping urls for each cron you want to monitor. You can then add the start/end pings appropriately in the script file/cron to start monitoring. Refer help for more details.

The graph shown in the details page, is the time difference between the start and end ping url. Hence its the time taken for your command/script execution.

As you have just printed the date which will take generally take less than a second, the duration shows 0, with a spike of 1 second at 11:04. You can verify with the cron log file, for the time when the cron was started and ended.

Thanks

Anita

Like (0) Reply

Thank you, Anita.

Like (0) Reply

Hi Anite,
Thanks for an excellent support.
You may want to ask your technical writers to add your suggestions to the documentation.
Bye,
Ron.

Like (0) Reply

Was this post helpful?