Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

Tag-Based Discovery – Ability to Exclude Specific CI Classes from Results

Sravani36
Tera Expert

Hello Team,

We are using Tag-Based Discovery in ServiceNow and have configured tags to identify and list Configuration Items (CIs). The functionality is working as expected, and the discovered results correctly display the CIs associated with the selected tags. The concept is similar to the Tag-Based Service Mapping approach described in our internal documentation.

However, we have a requirement to exclude specific CI classes from the discovery results even when those CIs contain the selected tags.

 

Thank you

Sravani C

1 REPLY 1

vaishali231
Kilo Sage

Hey @Sravani36 

 

Based on my understanding, Tag-Based Discovery does not provide an out-of-the-box option to exclude specific CI classes from the discovery target list. The discovery process primarily evaluates the configured tags, and if a resource contains the matching tag, it becomes a valid discovery target regardless of the CMDB class that will eventually be created or updated.

We faced a similar requirement where certain tagged resources needed to be ignored even though they matched the configured discovery tags. After reviewing the available options, here are the approaches that can be considered.

1. Verify if Tag Strategy Can Be Improved 

The first recommendation is to review the tagging strategy itself.

Instead of applying a generic discovery tag to every resource, consider introducing a dedicated discovery tag such as:

ServiceNow_Discovery = True

Discover = Yes

Only the resources that should participate in Discovery would receive this tag. This is the cleanest approach because it avoids unnecessary discovery activity and reduces maintenance.

2. Filter During Discovery Processing

If modifying the tagging strategy is not possible, the next option is to introduce filtering within the discovery process.

Depending on your implementation, you can extend the logic that builds the discovery target list and validate the expected CI class before continuing with discovery.

For example, you could exclude classes such as:

cmdb_ci_vm_instance

cmdb_ci_network_adapter

cmdb_ci_ip_address

cmdb_ci_storage_volume

If the discovered resource belongs to one of these excluded classes, simply skip further processing.

This approach requires customization and should be carefully documented since it may require review after platform upgrades.

3. Post-Discovery Filtering

Another upgrade-friendly approach is to allow Tag-Based Discovery to complete normally and then filter the resulting CIs afterwards.

This can be implemented using:

Business Rules

Flow Designer

Scheduled Jobs

Identification and Reconciliation-related processes (where appropriate)

The automation can identify unwanted CI classes and perform actions such as:

Ignore them in downstream integrations

Remove them from reports

Flag them with a custom attribute

Exclude them from operational processes

Although the discovery still occurs, this method avoids modifying the core discovery logic.

4. Pattern-Based Logic

If your environment uses Pattern Discovery, you can introduce conditional logic inside the discovery pattern.

For example:

Check the discovered resource type.

Compare it against a list of excluded classes.

Exit the pattern or skip classification for matching resources.

This reduces unnecessary processing while keeping the customization localized to the discovery pattern.

Things to Consider

Before implementing any solution, it is worth evaluating:

Are the excluded classes always identifiable before CI creation?

Are these cloud resources (AWS, Azure, GCP) or on-premise infrastructure?

Is the exclusion requirement based solely on the CI class, or are there additional conditions such as account, region, subscription, or resource type?

These answers can significantly influence the best implementation approach.

 

*************************************************************************************************************************************

If this response helps, please mark it as Accept as Solution and Helpful.

Doing so helps others in the community and encourages me to keep contributing.

Regards

Vaishali Singh

Servicenow Developer
Linkedin - https://www.linkedin.com/in/vaishali-singh-2273361bb