Monitor Cronjobs with Aria Operations
On a professional services project the customer wanted the VMware SRM backup monitored automatically, with a warning raised if the backup job ever failed. Here is how I did it.
On a professional services project the customer had a requirement for the VMware SRM backup: it had to be monitored automatically and raise a warning if the backup job ever failed. This post shows how I did it.
The starting point
The project had a particular starting point.
- An installed VMware Site Recovery Manager instance
- with its backup set up as a cronjob, following the documentation
- An installed VMware Aria Operations instance
- An installed VMware Aria Operations for Logs instance
- The two integrated with each other
The requirement was to monitor that cronjob and raise a warning automatically, on the right object, if the job ever failed.
The solution
Conceptually it is very simple.

Adjusting the cronjob
With
crontab -e
(as root) you edit the root user’s crontab.
There, a logger command has to be appended to the existing entry from the SRM export job’s backup setup.
2>&1 | logger -t export_sh -n syslog.soultec.ch -P 514 -T
The complete entry could then look like this:
45 15 * * * /usr/bin/sudo /bin/bash /opt/vmware/impex/bin/export.sh 2>&1 | logger -t export_sh -n syslog.soultec.ch -P 514 -T
That way, errors from the export.sh script are handed to logger, which forwards the entry to the syslog server.
Defining the alert in Aria Operations for Logs
The second step is to define an alert that also raises a warning in Aria Operations.

In the first section we set the text filter to “Export failed.” and the source has to contain the FQDN of our SRM server.
Within a five-minute window the alert triggers as soon as more than zero occurrences are counted, so on the first one.

We tick “Send to VMware Aria Operations” and set the fallback object to the SRM server. In our case the criticality is only a warning, and we have an auto cancel after 24 hours (1440 minutes). The warning disappears again if the message does not repeat within a day.
That is a cronjob monitored with the logger command, Aria Operations for Logs and Aria Operations.
Next steps
Do you have more challenges along these lines? Our team of experts is ready to help. Just get in touch, no strings attached.