I am attempting to create a report that will show the amount of days passed since our last unplanned downtime for certain servers. I originally thought I would use the "LastBoot" field and do a DateDiff on it to show the amount of days since the last reboot like:
SELECT NodeID, caption, DATEDIFF (day, LastBoot, getdate()) AS Days_Since_Last_Outage
FROM Nodes
WHERE caption = 'server'
OR caption = 'server2'
OR caption = 'server3'
ORDER by caption
Unfortunately this will not serve our purposes, as this would update every time we did monthly patches on our servers or rebooted for planned maintenance. Am I correct in assuming that even if I 'unmanaged' the servers before rebooting them, they would still update their "LastBoot" and screw up the report as soon as I managed them again? NPM doesn't have any option for scheduled maintenance windows currently, right? I can't think of any way to do this in any sort of semi-automated fashion, anyone have any ideas? The only thing I can come up with is creating a custom property and updating it manually with the date and time whenever unscheduled downtime occurs. Does NPM save the dates / times of when a server is down for more than x minutes somewhere?
Thanks!