Back to Opsview FAQ

CRONJOBS CRITICAL - Housekeeping cronjob has not successfully run for ... hours

The Opsview - Housekeeping - Cronjob Monitor service check looks at the timestamp of /opt/opsview/coreutils/var/opsview_cronjobs.stat and, if the timestamp is old, goes critical. The timestamp of this file is updated at the end of a successful housekeeping cron job. Something prevented the timestamp updating when the housekeeping cron job last ran.

This is usually caused by a permissions error under /opt/opsview/var/backups/ or /opt/opsview/coreutils/var/backups/. The permissions error prevents the housekeeping cron job completing successfully so the timestamp of opsview_cronjobs.statis not updated. We typically see this on systems that have been upgraded from Opsview 5.4.

Solution Copied

  1. Log in to the orchestrator as root.
  2. Check for Permission denied errors in the opsview_cronjobs.log file:
grep -i "permission denied" /opt/opsview/coreutils/var/log/opsview_cronjobs.log

Here is an example of a typical permissions error:

Removing files from /opt/opsview/coreutils//var/backups over 30 days old:
find: /opt/opsview/coreutils//var/backups/sw-migration/etc: Permission denied

If you see Permission denied errors, continue to the next step. If you do not see any such errors, examine the /opt/opsview/coreutils/var/log/opsview_cronjobs.log file for other errors and contact support.

  1. Fix the permissions using chown:
chown opsview:opsview /opt/opsview/var/backups/* /opt/opsview/coreutils/var/backups/*
  1. Wait for the housekeeping cronjob to run normally. The timestamp of the opsview_cronjobs.stat file should update when the housekeeping cron job completes successfully. After the timestamp updates, the Opsview - Housekeeping - Cronjob Monitor service check should go OK.
["Geneos"] ["FAQ"]

Was this topic helpful?