Stop ServiceNow from updating printer class

Steven Barber
Tera Contributor

Hello all

 

I am trying to stop ServiceNow from updating the printer class.
I am using a discovery source that doesn't use the IRE.
Since it doesn't use the IRE, the Reconciliation rule doesn't work.
Does anyone know of another way to stop the printer class from being updated by ServiceNow besides removing the IP Addresses from discovery?

1 ACCEPTED SOLUTION

Johns Marokky
Tera Guru

Hi @Steven Barber ,

Another way of doing is that restricting the ServiceNow Discovery not to do discovery on Network Printers.

For this you can go to Discovery Definition --> Configuration Console and uncheck the Network Printers under the Network Devices. This will stop discovering the Network Printers. (See the attached image for reference).

Screenshot 2023-02-01 at 11.19.57 PM.png

ServiceNow Discovery would bring the right and current data. i would recommend you to use the ServiceNow Discovery.

 

Mark Helpful if it helps in solving your query.

 

Regards,

Johns

View solution in original post

7 REPLIES 7

Your conclusion that IRE should be used is correct, but technically that statement is somewhat incorrect.  ServiceNow Discovery will always use the IRE.  And in order for it to use the reconciliation rules, it is required that all other data sources also use the IRE.  For it to be able to determine which attributes it can touch it needs to look at the existing entries in the history to determine which other data sources have set those attributes.  If the other source isn't using IRE then Discovery won't be able to apply any reconciliation rules, and it will overwrite all attributes unconditionally every time.  So it is important -- regardless of which source you wish to have priority over which classes and attributes -- that all data sources use IRE.  The only exception to this rule are for things like Business Applications or other CI Classes that don't have any identifier entries, in which case IRE has no effect.


The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.

Steven Barber
Tera Contributor

Thank you all for trying to help me.
I have only been using the CMDB for 8 months, so I am still learning.
Most of the time it has been training.

I am using Site Audit to bring in the printer class and as far as I can tell it doesn't use the IRE.
I have an IRE Data Source Rule set up to stop ServiceNow Discovery from creating printers.
I'm looking for ServiceNow not to update the printer by ServiceNow Discovery.

 

@Steven Barber 

Hi,

As per your requirement, you want to create printer records but don't want to update the same via Discovery. If my understanding is correct then you need to write a custom code to restrict the update of those records.

 

Please write a BR on Printer class using below code snippet:

This BR will be created 'onBefore' update

if(current.operation =='update')

{

current.setAbortAction(true);

}

 

Please mark the solution as correct/helpful, if it resolve your issue

Thanks !