The CreatorCon Call for Content is officially open! Get started here.

How to prevent Discovery to update few CIs?

Suggy
Giga Sage

I have few windows CIs who are active and working in the data center but due to some reason, we want to set them to retired in ServiceNow CMDB.

 

We dont want Discovery to touch those retired CIs. Is it possible?

 

PS - I thought of using identification inclusion rule. If I create a rule on windows table with condition like state = retired,

then when I scan that windows server, will it create a NEW CI again? as the inclusion rule will not consider the retired windows server above

5 REPLIES 5

Suggy
Giga Sage

Anyone

DaveHertel
Kilo Sage

Hi, OOB you can not use status values (like Retired) to NOT discover machines.  IP Discovery does not care (nor pay attention) to status when deciding what to discover.  Generally its using IP addresses, subnets, ranges of IPs, etc. to inform a disco. schedule what to scan.

But 1 option (not great... but ...). is to Blacklist/block X IP addresses to EXCLUDE them from discovery.  You can use global exclusions so that any discovery schedule will automatically NOT scan X ip address.   Of course if your targets IP changes for some reason, this approach is fragile and you'd need to update the excluded IPs.

 

IRE inclusion rules will not work to ban discovery from hitting X IP.  Discovery will still scan the box... which is inefficient if you dont really want the IP/box discovered at all. The IRE inclusion would address the payload AFTER its already been scanned which is kinda silly for the use case you mentioned.

For the use case you stated, I would look into excluding the IP(s)... otherwise IP disco is gonna continue to hit them every time discovery schedule runs.   

 

My 2 cents.  Hope this helps?

@DaveHertel  I believe @Suggy wont have the information on the IP ranges which include retired CIs. In addition to this, the CIs could be from different ranges.

 

so @Suggy write a before update BR on  cmdb window table with conditions as state is retired and name is one of (list of windows ci you want to exclude)

and abort the action.

 

This way your CIs wont get update in CMDB.

 

This is not a great solution but may work in your scenario.


Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023
LinkedIn

Mannapuram
Tera Guru

@Suggy Like everyone mentioned, the IP range is the best way to do it. If we change the 'Operational Status' and 'Install Status' to retired and when discovery re-run and it will update the 'Install status' -> 'Installed'  and other details will get updated (like RAM) but the 'Operational status' would remain 'Retired'. I did a test of this on the demo instance, and it did work this way. 

Mannapuram_0-1759348279768.png

Using the 'Operational Status -> Retired' not to update is a good idea. But if you are looking for Discovery not to touch these CI's at all, then excluding them from the IP range is best. If you can't exclude through IP range, then like @RaghavSh mentioned, use the operational status as retired and abort the very update. 

IRE will not create a duplicate CI because the status is in 'Retired'. As long as all the attributes of the Identification matches, IRE will update the details. You can try this on a single CI or small IP range and decide.