How to exclude specific VMs from vmware probe discovery

book

Article ID: 143897

calendar_today

Updated On:

Products

NIMSOFT PROBES DX Infrastructure Management

Issue/Introduction

In update 7.11 of vmware probe the release notes state: Ability to monitor a VCenter but exclude certain VMs to be discovered by vmware probe.

Is there documentation that describes this process as I need to exclude vms that have a specific naming convention other than the current exclusion that I already have in my probe configuration.

Environment

Release : 8.51

vmware 7.11 or higher

Component : UIM - VMWARE

Resolution

You can filter VMs that the vmware probe will consider for discovery by using a regular expression (REGEX) to filter VMs for matching names (filter them out).

To filter VMs for discovery by label name via Configuration key, follow these steps:

- Upgrade and start the vmware probe
- Navigate to Admin Console -> Raw Configure > Setup, and add the config key  'filter_out_vms_with_vm_name_matching_regex'
- Specify the value with 'VM name' of the VM(s) you want to exclude under the setup section via raw configure
- Save the changes and restart the probe
- Create a profile for the vCenter

Result-> the profile should be created and the VM name provided in the config key should not be added to the inventory.

Note: To add the VM to the vCenter, rename the VM with a name other than the value specified as the config key.

The original regex referenced and used by the customer did not work (as the regex was too 'greedy' and filtered out hundreds of VMs).

Suggested that the customer change the regex to each of the following and test it:

1.

(?i)^(.*wvmes.*)

Results were then as expected as per the vmware.log.

[Data Collector - wxxxxxxxxd.corpxxxNN.com, vmware] 2 VMs filtered out from inventory

 

2.

(?i)^(.*wvmes.*|.*wvdi.*)

Results expected as per the vmware.log.

[Data Collector - wxxxxxxxxd.corpxxxNN.com, vmware] 3 VMs filtered out from inventory


Regex tester.

https://www.freeformatter.com/regex-tester.html


For the vmware probe, this Oracle Java 7 regex tester came in handy--> https://www.freeformatter.com/java-regex-tester.html

The customer used (?i)^(.*wvmes.*|.*wvdi.*) to filter out any/all VMs that contain the strings, 'wvmes' or 'wvdi' from vmware probe discovery. (Ignoring case).

Additional Information

Alternative:

There's another way to keep VMs from being discovered that you can configure on the VMWARE side. Create a folder in vSphere and call it something like "monitoring-no-access" ... in vSphere, and on the user ID you use for your vmware probe, set the permissions on that user ID so it cannot access the "monitoring-no-access" folder.  That will keep the vmware probe from seeing any VMs you put in that folder.

- Configure the userid for specific/limited access.

- Restrict access for vCenter/cluster by making changes in the user which integrates with/accesses the vCenter.

Doing this after the VMs have already been created in UIM will not remove them from UIM, but it should keep them from coming back after you remove them from UIM.