[ZBXNEXT-2591] Add Resource Pool path to vmware.vm.discovery[] output Created: 2014 Nov 13  Updated: 2024 Apr 10  Resolved: 2022 May 24

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Proxy (P), Server (S)
Affects Version/s: 2.4.0
Fix Version/s: 6.2.0beta2, 6.2 (plan)

Type: New Feature Request Priority: Major
Reporter: Vadim Nesterov Assignee: Michael Veksler
Resolution: Fixed Votes: 11
Labels: lld, vmware
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Sub-task
part of ZBXNEXT-2043 Add functions for VMWare monitoring Closed
Team: Team B
Sprint: Sprint 88 (May 2022)
Story Points: 1

 Description   

In zabbix front-end, we can restrict user access only by groups. Because in host prototypes we can give some group prototypes it is impossible to restrict access to created VMs by resource pool. We created our own LLD rule in VMWare python API, which return also resource pool path.

{

  "{#VM.RPOOLPATH}": "/first_level/second_level_resource_path",
  "{#HV.NAME}": "10.6.200.63",
  "{#CLUSTER.NAME}": "some cluster",
  "{#VM.UUID}": "50197152-d369-4f53-5915-2dea85c5292c",
  "{#VM.NAME}": "VM.Test"
}

And in host prototype we can use {#VM.RPOOLPATH}



 Comments   
Comment by Mārcis Lielturks [ 2014 Nov 26 ]

+1

Please add more macros to VM discovery. This is essential for service (cloud) providers of virtual infrastructure. We need a way to auto-magically group VMs by resource pool, folder name or vDC so we can permit each customer to see only their own virtual infrastructure.

Comment by Mārcis Lielturks [ 2014 Nov 28 ]

Ah, and this is even more desired as hosts created by LLD host prototypes cannot be added to any group manually

Comment by oleh hrebchuk [ 2015 Sep 12 ]

Could you add a resource pool monitoring?

Comment by Michał Panasiewicz [ 2021 Aug 31 ]

+1
When this wiil be add to template ?

Comment by Michał Panasiewicz [ 2021 Aug 31 ]

https://www.zabbix.com/forum/zabbix-help/407592-how-to-get-information-about-resource-pool-for-discovered-vm-in-vmware-environment#post407657

"So far I investigated what I can get list of all Resource Pools from vCenter by using it's REST API:
Code:

curl -i -k -H 'Accept:application/json' -u '[email protected]:MYPASSW0RD' -X POST https://vcsa.local.lv/rest/com/vmware/cis/session

HTTP/1.1 200 OK
Date: Mon, 24 Aug 2020 11:24:19 GMT
Set-Cookie: vmware-api-session-id=f8888416677811b77777f980c751337f;Path=/rest;Secure;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: application/json
Transfer-Encoding: chunked

===

curl -i -k -H 'Accept:application/json' -H 'vmware-api-session-id: f8888416677811b77777f980c751337f' -X GET https://vcsa.local.lv/rest/vcenter/resource-pool

{"value":[

{"name":"Resources","resource_pool":"resgroup-10786"}

,

{"name":"Resources","resource_pool":"resgroup-11872"}

,

{"name":"Resources","resource_pool":"resgroup-6653"}

,

{"name":"My_System","resource_pool":"resgroup-6111"}

,

{"name":"My_TestDev","resource_pool":"resgroup-6112"}

,

{"name":"My_Production","resource_pool":"resgroup-6113"}

]}

So, I guess what I can create new "Discovery Rule" in template "Template VM VMware" and use it to automatically create "Host Groups" for all VMware "Resource Pools" what vCenter reporting.

Next question - how can I automatically put discovered Host objects (VM's) into this Host Groups (Resource Pools)? Is there any way how to bind them together?
Last edited by Everlasting; 25-08-2020, 13:41. "

Comment by Aleksejs Sestakovs [ 2022 May 06 ]

Available in versions:

Documentation updated:

Comment by Vadim Nesterov [ 2022 May 13 ]

A comment for fun:

Created:2014 Nov 12 23:55 -

Sprint 88 (May 2022) = 8 years 

Thats agile!

Generated at Wed May 21 07:24:44 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.