Nagios_Remote_Jobs: Database Maintenance (dbmaint) stale
Posted: Tue Jul 13, 2021 5:42 pm
Hi,
I have a service created long ago by a wizard and then made generic. It now warns pretty frequently but eventually clears. It's been doing this since 5/18/21.
The system running the check is 5.8.4 (updated last week) and the 2 hosts being checked are 5.7.3. Both of the checked hosts have the same warning alerts on Nagios_Remote_Jobs.
Running dbmaint.php manually only takes a second or two.
It's Nagios_Remote_Jobs and after executing it from CCM and massaging a bit I have the following test. It typically clears a bit before 600 seconds.
The dbmaint cron runs every 5 minutes and there's nothing in the log.
I've checked the DB, saw no errors, and ran the repair script.
The check runs every 5 minutes and has 4 retries and it still sometims sends notifications.
I've done a good bit of research on this and can't find a reason for it to have a problem. Any ideas?
Thanks
I have a service created long ago by a wizard and then made generic. It now warns pretty frequently but eventually clears. It's been doing this since 5/18/21.
The system running the check is 5.8.4 (updated last week) and the 2 hosts being checked are 5.7.3. Both of the checked hosts have the same warning alerts on Nagios_Remote_Jobs.
Running dbmaint.php manually only takes a second or two.
It's Nagios_Remote_Jobs and after executing it from CCM and massaging a bit I have the following test. It typically clears a bit before 600 seconds.
Code: Select all
# address=10.133.134.85; /usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=$address --url="https://$address/nagiosxi/" --apikey='fake' --mode=jobs
Database Maintenance (dbmaint) stale (505 seconds old)
# address=10.133.134.85; /usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=$address --url="https://$address/nagiosxi/" --apikey='fake' --mode=jobs
Database Maintenance (dbmaint) stale (541 seconds old)
# address=10.133.134.85; /usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=$address --url="https://$address/nagiosxi/" --apikey='fake' --mode=jobs
All jobs are running okay.Code: Select all
CREATING: /usr/local/nagiosxi/var/dbmaint.lock
CLEANING ndoutils TABLE 'commenthistory'...
SQL: DELETE FROM nagios_commenthistory WHERE entry_time < FROM_UNIXTIME(1563141301)
CLEANING ndoutils TABLE 'processevents'...
SQL: DELETE FROM nagios_processevents WHERE event_time < FROM_UNIXTIME(1594677301)
CLEANING ndoutils TABLE 'externalcommands'...
SQL: DELETE FROM nagios_externalcommands WHERE entry_time < FROM_UNIXTIME(1625608501)
CLEANING ndoutils TABLE 'logentries'...
SQL: DELETE FROM nagios_logentries WHERE logentry_time < FROM_UNIXTIME(1618437301)
CLEANING ndoutils TABLE 'notifications'...
SQL: DELETE FROM nagios_notifications WHERE start_time < FROM_UNIXTIME(1618437301)
CLEANING ndoutils TABLE 'contactnotifications'...
SQL: DELETE FROM nagios_contactnotifications WHERE start_time < FROM_UNIXTIME(1618437301)
CLEANING ndoutils TABLE 'contactnotificationmethods'...
SQL: DELETE FROM nagios_contactnotificationmethods WHERE start_time < FROM_UNIXTIME(1618437301)
CLEANING ndoutils TABLE 'statehistory'...
SQL: DELETE FROM nagios_statehistory WHERE state_time < FROM_UNIXTIME(1563141301)
CLEANING ndoutils TABLE 'timedevents'...
SQL: DELETE FROM nagios_timedevents WHERE event_time < FROM_UNIXTIME(1626213001)
CLEANING ndoutils TABLE 'systemcommands'...
SQL: DELETE FROM nagios_systemcommands WHERE start_time < FROM_UNIXTIME(1626213001)
CLEANING ndoutils TABLE 'servicechecks'...
SQL: DELETE FROM nagios_servicechecks WHERE start_time < FROM_UNIXTIME(1626213001)
CLEANING ndoutils TABLE 'hostchecks'...
SQL: DELETE FROM nagios_hostchecks WHERE start_time < FROM_UNIXTIME(1626213001)
CLEANING ndoutils TABLE 'eventhandlers'...
SQL: DELETE FROM nagios_eventhandlers WHERE start_time < FROM_UNIXTIME(1626213001)
LASTOPT: 1626210901
INTERVAL: 60
NOW: 1626213301
OPTTIME: 1626214501
CLEANING nagiosxi TABLE 'commands'...
SQL: DELETE FROM xi_commands WHERE processing_time < FROM_UNIXTIME(1626184501) AND status_code = 2
CLEANING nagiosxi TABLE 'events'...
SQL: DELETE FROM xi_events WHERE processing_time < FROM_UNIXTIME(1626184501) AND status_code = 2
CLEANING nagiosxi TABLE 'auth_tokens'...
SQL: DELETE FROM xi_auth_tokens WHERE auth_valid_until < FROM_UNIXTIME(1626126901)
CLEANING nagiosxi TABLE 'cmp_trapdata_log'...
SQL: DELETE FROM xi_cmp_trapdata_log WHERE trapdata_log_datetime < FROM_UNIXTIME(1618437301)
SQL1: SELECT xi_meta.meta_id FROM xi_meta LEFT JOIN xi_events ON xi_meta.metaobj_id=xi_events.event_id WHERE metatype_id='1' AND event_id IS NULL
SQL2: Deleted 0 (DELETE FROM xi_meta WHERE meta_id IN (SELECT xi_meta.meta_id FROM xi_meta LEFT JOIN xi_events ON xi_meta.metaobj_id=xi_events.event_id WHERE metatype_id='1' AND event_id IS NULL))
CLEANING nagiosxi TABLE 'auditlog'...
SQL: DELETE FROM xi_auditlog WHERE log_time < FROM_UNIXTIME(1623621301)
CLEANING nagiosql TABLE 'logbook'...
SQL: DELETE FROM tbl_logbook WHERE time < FROM_UNIXTIME(1626184501)
Repair Complete: Removing Lock File
Code: Select all
mysqlcheck -r -f -uroot -pnagiosxi --all-databases
/usr/local/nagiosxi/scripts/repair_databases.shI've done a good bit of research on this and can't find a reason for it to have a problem. Any ideas?
Thanks