Skip to main content


A few months ago, we added the capability to use VMWare Custom Attributes metadata as attributes when discovering ESX and Virtual Machines using the VMWare daemon and plugins. 

 

These Custom Attributes generally help vCenter administrators to logically group and organize their resources within the vCenter. One specific thing about these attributes is that they are user-defined, which means that every user can set their own key/value pairs.

 

As an admin, you need complete control over a resource metadata value so that it can be a piece of reliable information to organize your CMDB, manage permissions, or provision your monitoring efficiently! 

 

New metadata available within your discovery rules

 

Based on your feedback, we decided to make available new metadata commonly defined at your ESX/vCenter level: Tags indeed! The goal behind it is to align Centreon capabilities with those of the standard automation tools like Ansible and make your life easier by adding some magic to your operations: 

  • Provision your VMWare resources using your favorite automation tools, tag your resources with any key/value that is relevant to your use case

  • Discover these resources thanks to Host Discovery

  • Leverage associated metadata to organize your monitoring (groups, categories) or apply different templates (apply OS or Application template to each resource associated with a given tag).

 

You can read more about Tags and Custom Attributes on the VMWare blog.

 

Let’s see how it appears in the VMWare UI from a user perspective (it may differ depending on your version). We will focus on the centreon-central-vm.

 

Z-gb1R8pcSdoubqOZr6PNaasnyoeSL_THSRngQAQuhluRuTffn1z6KxJJ73fPiqrdNZcTVV_fYLKioPrMHVP5gZOg2GYs0qXnF7pnmP52MIeOXVExF8fwPIqwYDwq4kwFZS0IZbha1f_yGSoPrCtH0x0nX71-wZHFkf-wq9Vt9RtAw2_U2GHpdzVGw

 

Those tags will help apply a template, filter out some results, or assign a specific dimension. 

Categories aren’t managed (yet), but we would love to hear from you in the comment section if you have such a need. 

 

How to set it up

 

You must have a Centreon version > 21.04 and Centreon VMWare daemon > 3.2.5 to use this feature. 

 

To benefit from tags management, you will have to perform several actions. It will not take you more than five minutes! 

 

Update your VMWare daemon, and restart it 

 

On poller(s) executing the centreon-vmware daemon, update the package: 

 

RPM Distributions: 

    yum update centreon-plugin-Virtualization-VMWare-daemon

 

Debian 11:

    apt upgrade centreon-plugin-virtualization-vmware-daemon

 

Restart the daemon: 

systemctl restart centreon_vmware

 

Update your Monitoring Pack(s)

 

Upgrade your VMWare Monitoring Packs on your central server, providing Host discovery rules. 

 

If you are using an offline license, upgrade packages first: 

 

RPM Distributions: 

yum update centreon-pack-virtualization-vmware2-vm centreon-pack-virtualization-vmware2-esx

 

Debian 11

apt upgrade centreon-pack-virtualization-vmware2-vm centreon-pack-virtualization-vmware2-esx

 

> If you want to monitor VMWare resource for the first time, substitute update/upgrade by install in the commands above.

 

Go to the ‘Configuration > Plugin Packs” menu and click on the VMWare ESX and VMWare VM Packs to install. 

 

OqTFX3l0c8NWYTlcbLhp6iwQXkPJvaTbWB-aXDlSyoc2qx5gnt2KrfJdBfKLAZ7tD_6Qc77TQOW-pBCwCc-WgLt0UR-fiXXeuf4rAfC7TkBxBg43iOD9Hds0PAWRuh05orCBk4_vXAs7jsI6kSAsoBXheZOVoECuebSb8KeQe_4WI_Ao7GehwFUyFA

 

Create or update your Host Discovery job definition

 

Go to “Configuration > Hosts > Discovery”.

 

If you create a discovery job for the first time, check out this documentation before going further.

 

If you update an existing one, just click on your current job definition and add --tags within the ‘Extra Options’ field:

 

z9pln0FPGbHshD6ksewp-U9nKTL6LWKhz75QdU7kycv4fGWbaGzbCwl2kR6OSqw6pTbtRc_Tfi5d3WxJnOLFqTJNgMazQ4Gc8h8AvO4_rf9K0QsVV82XbX3BCCjAdtsu7afPnr7-6LhseCWeY59L9_F-tjiETrFLMdMHFELuMsYfVIGF5BWnAwtY-w

 

Note that we increased the timeout to 30 seconds as the API for tags differs from the one used for monitoring, and calling it for each of the discovered assets introduces some extra processing. 

 

Leverage Tags to filter the discovery result

 

Once your job successfully runs, you should see the result of the discovery on the right. Here I discovered 136 virtual machines: 

 

rgBHe5aIpAxeRPYrE3eUyy6C0y9NXr455AyFKhZeSgcDklah_USqbVqJR9zJrTaCegAbFuf0MKgrqYn10a8acxmFFjycDUP9Xq00ce0P647rN67670QLzjmOFCVU6B2Ory3DdmUo8h1KeqDm8sWfgFSBWFM1i6PaLYdx4OSxgsNfD6X85AkyAPTybA

 

To leverage tags on my ‘centreon-central-vm,’ we can use three kinds of mappers:

 

  • Exclusion, to exclude all VM with a tag with monitoring as a tag description and for which the tag name doesn’t match enabled. 

XkuquVPHLrAnW2sE7mPJWcVud99PExv6mn0qc17xJ3h12JJSUMen4_hVJGWRI8BEwdMonPa7TKvXiw2Ex73IdDF1GOwRah-739wOTByplmq2oMRMe8rai2fPtYDZ7jxSr3R5kLXoQ_RNnYudNC_cBST-0eBaqjypeeTklDXfXDG5fjpG-QVWQyWjKg



 

  • Template, to apply the OS-Linux-SNMP-custom template to VM having OS as a tag description and linux as a tag name.

 

LsNvvuhi8-GzGVb48EWKh525VeDsJoVQZx5bTi_mcJaIKPLN_QcjnXLBJ4bQFg5RD1NT9eHw-duOvZYl4J1wQ6HkMhbsgAtpKMxN_zCxzX8MJfDmvd-38qnu06cqaYZG0AKWEH91BzOBS6Q3v7XUZx2XDb0k3TK6gYLKFBiWwKa-5m8MpbrQJyQj1A

 

  • Host group, to create/assign the prod host group to every VM having the tag name prod:

6G6upXaBa4QxpjkDM-446tNVzJcGCf6wAV0EAolVh3qHzmc5jCLDIGQJx5_L_Ezfp4SvuGpDRMvTw7xTl7whIzlADlPXRb0Wo8e8Lrp82g69ZBQFiJhqgdzck523ziLRJprnIaGqArd1KPl_2krdvT66ZCfoP15YgC5xeKs0_kf5xyepYfgQrGRoOg

 

The final result before hitting save will be similar to: 

 

cbq5dKz1IIOCT8SlyIK20g3tanBeM9Y2GedaGtZCG8OFHDl2rX-RxEZQOJ9ac7SXtgYZJG_KG4gq_1xgVD4L6LyrrYkzaLCZ2rohW3bB7aOGw6gV9IQH41QKdaE2NnpSBq8vLkrxx9lCvZ7Tda9DxJ1kTYrAVZaqmFp3D5oUFuGSCBY2cEPbLUlmFg



From 136 results, I was able to filter on the very specific VM interesting me: 

 

3Uw9vS3pzOfD_GlhUisInVfnMcLww8de8LQo3kU4OzpsidLMxt8FJfnFoYDjJ2ruLU9Dfyb2yYReAePqG0KeSl2Q4eQEKC-QomSRk3tjFoTepkjyVwmgN2JgH0jFk3WNVAZf8SWcNr6hSsT-gJ8ieY-SeluvLerL1vrZ5Xmhp-0bBVILBqX1AxPTew
 

Enjoy! As usual, share your feedback in the comments to help us continuously improve this feature. 

Hello, the link to image seems to be broken

 


from the discussion 

it seems the tag are still not populated, but the custom_attributes are, how can we explain this ?

 


for informations:

rpm -qa | grep centreon | egrep -v "(plugin|pack|widget)" | sort
centreon-auto-discovery-server-22.10.0-14.el8.noarch
centreon-awie-22.10.0-5.el8.noarch
centreon-broker-22.10.0-16.el8.x86_64
centreon-broker-cbd-22.10.0-16.el8.x86_64
centreon-broker-cbmod-22.10.0-16.el8.x86_64
centreon-broker-core-22.10.0-16.el8.x86_64
centreon-broker-storage-22.10.0-16.el8.x86_64
centreon-central-22.10.4-1.el8.noarch
centreon-clib-22.10.0-16.el8.x86_64
centreon-common-22.10.4-1.el8.noarch
centreon-connector-22.10.0-16.el8.x86_64
centreon-connector-perl-22.10.0-16.el8.x86_64
centreon-connector-ssh-22.10.0-16.el8.x86_64
centreon-engine-22.10.0-16.el8.x86_64
centreon-engine-daemon-22.10.0-16.el8.x86_64
centreon-engine-extcommands-22.10.0-16.el8.x86_64
centreon-gorgone-22.10.0-13.el8.noarch
centreon-gorgone-centreon-config-22.10.0-13.el8.noarch
centreon-license-manager-22.10.0-5.el8.noarch
centreon-license-manager-common-22.10.0-5.el8.noarch
centreon-perl-libs-22.10.4-1.el8.noarch
centreon-poller-22.10.4-1.el8.noarch
centreon-pp-manager-22.10.0-6.el8.noarch
centreon-release-22.10-1.el8.noarch
centreon-trap-22.10.4-1.el8.noarch
centreon-web-22.10.4-1.el8.noarch