AnsweredAssumed Answered

Problem with maintenance timestamps in CMDB_lookup probe

Question asked by 1_keithk on Jul 3, 2012
Latest reply on Jul 5, 2012 by 1_keithk

Is anyone using the maintenance table in the CMDB_lookup probe? We have been testing is and encoutered an issue. I had one record in the table with the following end time:

 

2012-06-29 23:56:00.000

 

When I was testing on 6/28 (local time), the server was treated as under maintenance. As soon as midnight passed, the server was no longer considered under maintenance. Here are the lines in the log:

 

Jun 28 23:59:55:322 [Thread-2068, CMDB_lookup] readMaintenanceDB called - loading maintenance table  Jun 28 23:59:55:332 [Thread-2068, CMDB_lookup] Maintenance record read: nimdemo1.example.com null 2012-06-28 2012-06-29  Jun 28 23:59:55:332 [Thread-2068, CMDB_lookup] Query: SELECT hostname, ipaddress, starttime, endtime FROM cmdbMaintenance WHERE endtime > getdate() records read: 1  Jun 28 23:59:55:332 [Thread-2068, CMDB_lookup] readMaintenanceDB: finished loading maintenance table. 1 entries loaded.  Jun 28 23:59:55:332 [Thread-2068, CMDB_lookup] Currently under maintenance: nimdemo1.example.com    Jun 29 00:00:10:861 [Thread-2068, CMDB_lookup] readMaintenanceDB called - loading maintenance table  Jun 29 00:00:10:861 [Thread-2068, CMDB_lookup] Skipping obsolete maintenance record: nimdemo1.example.com null 2012-06-28 2012-06-29  Jun 29 00:00:10:861 [Thread-2068, CMDB_lookup] Query: SELECT hostname, ipaddress, starttime, endtime FROM cmdbMaintenance WHERE endtime > getdate() records read: 1  Jun 29 00:00:10:861 [Thread-2068, CMDB_lookup] readMaintenanceDB: finished loading maintenance table. 0 entries loaded.

I also find it strange that the SQL query attempts to select only rows that end in the future, but then the probe checks for obsolete records after the query returns. It seems like it should not be possible for the SQL query to return obsolete records. I also noticed that the "Skipping obsolete maintenance" seems to log the entire contents of the returned row and shows only the date part of each timestamp.

 

Any ideas?

Outcomes