ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

snmpcollector probe template : hostname based "OR" example using regex

book

Article ID: 112375

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

We have a common template for all the network devices. The template which has device filters is not getting applied. For few of the selective network devices we want to monitor some extra metrics. The selection criteria is hostname contains 'ABC' or 'XYZ' or '123'

In the new template device filter, we have added 3 rules.

hostname contains 'ABC'
hostname contains 'XYZ'
hostname contains '123'

Although precedence of this new template is lower than the precedence of common template, te new template is not applying to those devices which are expressed in the device filter. How can we fix this issue?

Environment

snmpcollector probe ANY version
azure probe
vmware probe

Resolution

Evaluation checks if all rules are satisfied, so every rules are treated as "AND" operator.
If you would like to express "OR" operator, you can use Regular Expression.
This is an example of device filter where device name contains "ABC" or "XYZ" or "123"

[Type] Hostname (or System Name)
[Condition] Regex
[Value] .*ABC.*|.*XYZ.*|.*123.*


NOTE
The value for Regex is CASE SENSITIVE.
*abc* does not match in this example.

Additional Information

If you would like to use IP Address for filter, the same concept is applied.

Non-working example.

Working example.

Note: This methodology works with the azure, and vmware probes as well.

Attachments