When does last_discovered get updated?

mb27
Tera Expert

Some classes get their "last_discovered"   (most recent discovery) attribute updated, some don't.

What updates last_discovered ?

Why do some classes get this updated, why do others not?

Our users want to see the "most recent discovery"   date and time. It's a confidence thing. Is the CMDB   up to date? Or have we just got a lot of old information that hasn't been updated for some time? Two recent upgrades, Windows 2008 and Eureka had the huge negative effect on discovery. The users could see that things were not being discovered after the Eureka upgrade because the "most recent discovery" attribute showed dates in the past, that corresponded to the day we upgraded ServiceNow.     When we rolled out the Windows 2008 upgrade, we could see servers being discovered as they had the most recent discovery field updated. But other stuff (web sites in pariticular) didn't get the most recent discovery field updated. In fact they weren't being discovered for a number of reasons, but we kept on trusting out o9f date information.

is there any down side to me adding the following to a sensor:

current.last_discovered = gs.nowDateTime();

1 ACCEPTED SOLUTION

doug_schulze
ServiceNow Employee
ServiceNow Employee

MIke you are correct our base classes off cmdb_ci_hardware get the most recent discovery updated in the identification phase, applications do as well.   However websites and such as you note, do not. Adding that bit to a sensor isn't going to hurt anything but I would recommend making your own sensor and not modify the out of box just so you can ensure that you continue to get updates in the future.


View solution in original post

5 REPLIES 5

doug_schulze
ServiceNow Employee
ServiceNow Employee

MIke you are correct our base classes off cmdb_ci_hardware get the most recent discovery updated in the identification phase, applications do as well.   However websites and such as you note, do not. Adding that bit to a sensor isn't going to hurt anything but I would recommend making your own sensor and not modify the out of box just so you can ensure that you continue to get updates in the future.


Doug


I need all my CIs be updated with the "most recent discovery"   date and time. How can I create a sensor to update that information at all the CIs?


thanks!


Jesus



doug_schulze
ServiceNow Employee
ServiceNow Employee

I'd suggest that you have a Business rule on cmdb_ci that on update or insert sets current.last_discovered to the current date time


mb27
Tera Expert

Perfect answer! Thanks Doug.