We need garantee that crond, daemon of crontab, are running on a linux machine.
Article Comments
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
Aug, 2011 - Permalink
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?
Dec, 2012 - Permalink
Hello,
I'm afraid in the moment this can only be done with Custom Exe Sensors in PRTG.
best regards.
Aug, 2011 - Permalink