What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

How to monitor crond linux service

Votes:

0

We need garantee that crond, daemon of crontab, are running on a linux machine.

crond crontab daemon linux monitor

Created on Aug 15, 2011 7:59:36 PM



3 Replies

Votes:

0

Hello,

I'm afraid in the moment this can only be done with Custom Exe Sensors in PRTG.

best regards.

Created on Aug 16, 2011 3:46:08 PM by  Torsten Lindner [Paessler Support]



Votes:

0

I was going to suggest that you write a small script that checks to see if crond is running and drop a bracketed number ([1] for on, [0] for off) into a page that can be accessed by PRTG over HTTP. Using an HTTP sensor you can then grab that number and use a change or critical-limit trigger if the value is ever 0. However that would require a cron job on the host and if crond is down....

So use a second host that runs a slightly more sophisticated script that uses SSH/Telnet to log into the remote machine and then save the value to a file on one of the machines. One machine runs the cronjob to look for crond running on the second machine.

In pseudo-code:

ssh user@machine-to-monitor
ps -ef | grep -c crond > status.html (or "service crond status; echo "["$?"]" > status.html")
exit

Created on Aug 18, 2011 2:23:20 PM



Votes:

0

You could also use SNMP...

In snmpd.conf add the line below to monitor this process: proc crond

Then in PRTG, add a SNMP Library Sensor, choose Basic Linux Library, then find process count. It will not list the name, but a number...so if you have five processes listed in snmpd.conf, it will correspond to the number in that list.

Finally you can set an error limit of less than 1 or whatever you need running, to trigger an alert.

Make sense?

Created on Dec 7, 2012 4:11:33 AM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.