[ZBX-19624] Wrong ip detection for vmware HV in case of multiple instances of management interfaces Created: 2021 Jul 01 Updated: 2024 Apr 10 Resolved: 2021 Jul 17 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Proxy (P), Server (S) |
Affects Version/s: | 5.4.2, 6.0.0alpha1 |
Fix Version/s: | 5.4.3rc1, 6.0.0alpha1, 6.0 (plan) |
Type: | Problem report | Priority: | Trivial |
Reporter: | Michael Veksler | Assignee: | Michael Veksler |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
vmware |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() |
||||||||||||||||||||
Issue Links: |
|
||||||||||||||||||||
Team: | |||||||||||||||||||||
Sprint: | Sprint 78 (Jul 2021) | ||||||||||||||||||||
Story Points: | 0.25 |
Description |
For cases where HV "management" interface contains several instances - ip detection is wrong. We should take into account selectedVnic property in our xpath |
Comments |
Comment by Michael Veksler [ 2021 Jul 01 ] |
Take selectedVnic into account <VirtualNicManagerNetConfig xsi:type="VirtualNicManagerNetConfig"> <nicType>management</nicType> <multiSelectAllowed>true</multiSelectAllowed> <candidateVnic> <device>vmk1</device> <key>management.key-vim.host.VirtualNic-vmk1</key> <portgroup></portgroup> <spec> <ip> <dhcp>false</dhcp> <ipAddress>10.15.78.214</ipAddress> <subnetMask>255.255.255.0</subnetMask> </ip> <mac>00:50:56:61:35:15</mac> <distributedVirtualPort> <switchUuid>50 32 8e 52 37 51 79 08-2d f8 04 ae d0 33 01 fe</switchUuid> <portgroupKey>dvportgroup-68603</portgroupKey> <portKey>1488</portKey> <connectionCookie>451620923</connectionCookie> </distributedVirtualPort> <mtu>9000</mtu> <tsoEnabled>true</tsoEnabled> </spec> </candidateVnic> <candidateVnic> <device>vmk2</device> <key>management.key-vim.host.VirtualNic-vmk2</key> <portgroup></portgroup> <spec> <ip> <dhcp>false</dhcp> <ipAddress>10.15.86.214</ipAddress> <subnetMask>255.255.255.0</subnetMask> </ip> <mac>00:50:56:68:06:d1</mac> <distributedVirtualPort> <switchUuid>50 32 8e 52 37 51 79 08-2d f8 04 ae d0 33 01 fe</switchUuid> <portgroupKey>dvportgroup-68605</portgroupKey> <portKey>1752</portKey> <connectionCookie>723950379</connectionCookie> </distributedVirtualPort> <mtu>9000</mtu> <tsoEnabled>true</tsoEnabled> </spec> </candidateVnic> <candidateVnic> <device>vmk0</device> <key>management.key-vim.host.VirtualNic-vmk0</key> <portgroup></portgroup> <spec> <ip> <dhcp>false</dhcp> <ipAddress>10.79.64.214</ipAddress> <subnetMask>255.255.255.0</subnetMask> </ip> <mac>0c:c4:7a:d2:f4:3e</mac> <distributedVirtualPort> <switchUuid>50 32 8e 52 37 51 79 08-2d f8 04 ae d0 33 01 fe</switchUuid> <portgroupKey>dvportgroup-4830</portgroupKey> <portKey>423</portKey> <connectionCookie>1248203149</connectionCookie> </distributedVirtualPort> <mtu>9000</mtu> <tsoEnabled>true</tsoEnabled> </spec> </candidateVnic> <selectedVnic>management.key-vim.host.VirtualNic-vmk0</selectedVnic> </VirtualNicManagerNetConfig> |
Comment by Michael Veksler [ 2021 Jul 08 ] |
Available in:
|
Comment by Sebastian Petersen [ 2021 Jul 15 ] |
in my particular case, this would probably not solve the problem. The MGMT interface is not reachable via Zabbix, only ESXi Hosts in between them can communicate with the MGMT vmkernel port. Would there be an option to use HV.DNS for the FQDN of the host? |
Comment by Michael Veksler [ 2021 Jul 15 ] |
Curious idea. You can create a new ZBXNEXT. |
Comment by Michael Veksler [ 2021 Jul 15 ] |
Or you can change the template only: |
Comment by Sebastian Petersen [ 2021 Jul 15 ] |
Michael, this worked. When changing the Prototype to HV.NAME it actually populated the FQDN. Nice! Thanks |
Comment by Marco Hofmann [ 2021 Sep 02 ] |
Thanks for the fix! |
Comment by Marco Hofmann [ 2021 Nov 15 ] |
MVekslers Last Friday we finally upgraded from 5.2.7 to 5.4.7 (yay!), and I was looking forward to see this fixed, but sadly we are still affected by this bug. Should we re-open this, or create a new issue? Background: VMware vCenter 7.0.2 vSAN Cluster with three nodes. Only Node 1 has this problem after LLD discovery: (Tested on 5.4.7 and a 6.0.0alpha6 appliance) I would expect 192.168.122.181 there, instead of the IP of the vmk3 adapter, which works for Node 2 & 3. |
Comment by Michael Veksler [ 2021 Nov 15 ] |
starko Be so kind show the xml with config.virtualNicManagerInfo.netConfig response for the problematic HV. We will show this xml in ... vmware_service_get_hv_data() SOAP response: ... in debug level = 5 for "vmware collector" |
Comment by Michael Veksler [ 2021 Nov 15 ] |
starko - I want to look at VirtualNicManagerNetConfig as in example above for the problematic HV. |
Comment by Marco Hofmann [ 2021 Nov 15 ] |
MVekslers I got the XML data, any way I can sent you in private, instead of posting here public? I guess I found a hint, for the one not working, the XML states: |
Comment by Marco Hofmann [ 2021 Nov 16 ] |
XML response was transferred and received by Zabbix. Public communication may continue here. |
Comment by Michael Veksler [ 2021 Nov 16 ] |
starko What are the main criteria of main (management) interface in your case ? |
Comment by Michael Veksler [ 2021 Nov 16 ] |
What's the difference between vmk0 and vmk3? |
Comment by Michael Veksler [ 2021 Nov 16 ] |
starko Be so kind send me the result of vmware-hv-netinfo.sh I am interested in the values of key summary.runtime.networkRuntimeInfo.netStackInstanceRuntimeInfo I hope the result will help as understand the which interface is main. |
Comment by Marco Hofmann [ 2021 Nov 16 ] |
I will answer as soon as possible MVekslers, but our VMware administrator is not in the office today, and I'm not qualified to answer your questions, and it doesn't make sense if I post my assumptions here. I expect to answer you tomorrow evening. I will take a look at the script. Where do i execute it? From my client against vCenter? Or on ESX itself? |
Comment by Michael Veksler [ 2021 Nov 16 ] |
The script have to execute against vCenter. |
Comment by Marco Hofmann [ 2021 Nov 16 ] |
I submitted the requested data regarding vmware-hv-netinfo.sh in private. Regarding your other questions, I have to consult our VMware administrator. |
Comment by Michael Veksler [ 2021 Nov 16 ] |
Did not help... |
Comment by Michael Veksler [ 2021 Nov 17 ] |
starko Be so kind, replace in the script <urn:pathSet>summary.runtime.networkRuntimeInfo.netStackInstanceRuntimeInfo</urn:pathSet> to <urn:pathSet>config.network</urn:pathSet> and send me xml response |
Comment by Michael Veksler [ 2021 Nov 17 ] |
starko What ip of vCenter ? |
Comment by Marco Hofmann [ 2021 Nov 17 ] |
I just send you the result of the altered script and the vCenter IP. |
Comment by Marco Hofmann [ 2021 Nov 17 ] |
MVekslers I had a long talk to our VMware Administrator. According to him, the error is more on our, than on Zabbix side. Let me explain in detail:
Please tell me your thoughts. |
Comment by Michael Veksler [ 2021 Nov 17 ] |
I think about two steps possibility:
|
Comment by Marco Hofmann [ 2021 Nov 17 ] |
I talked with our VMware admin, he says that the second idea with the default gateway is very good. In his opinion, only one of the mgmt interfaces will (and should) have a default gateway set. (as far as we know) So it's either the interface, with the default gateway configured and/or the interface, that shares the IP-subnet with the gateway. Both sound great! |
Comment by Michael Veksler [ 2021 Nov 22 ] |
Moved the problem and decision to |