Ad Widget

Collapse

"Invalid second parameter" and "Uknown hypervisor uuid" with official VMware template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jmbluethner
    Junior Member
    • Jan 2025
    • 2

    #1

    "Invalid second parameter" and "Uknown hypervisor uuid" with official VMware template

    Hello fellow networking friends

    I've been using Zabbix for quite some time now, both for my homelab as well as in both companies I've worked so far. So I'm not completely new, but still far from being a real expert.

    I've set up a completely fresh install of Zabbix 7.2.1 on Debian 12 - Everything latest and up to date.

    I started to add our Switches via SNMP - Works great.
    Then I wanted to add our three ESX Hosts, and that's where the problems started ...
    I've created all three hosts and assigned the official "VMware Hypervisor" template which ships with Zabbix by default.
    I've also added the StartVMwareCollectors argument with a value of 5, as described in the template docs, and the macros {$VMWARE.URL}, {$VMWARE.USERNAME}, {$VMWARE.PASSWORD} and {$VMWARE.HV.SENSOR.DISCOVERY} are also configured for every host.

    Little side note: While we do have a vCenter running, I thought it's smarter to add the hosts directly, in case the vCenter VM fails at some point.

    Now, if I go to one of those three hosts (the behavior is the exact same for all three) all data collections fail.
    I get the following two errors:
    • Invalid second parameter.
    • Unknown hypervisor uuid.
    The user defined in the macro is a separate monitoring user that's assigned to the "ReadOnly" group, as stated on various articles regarding the setup. I've also successfully logged in using that user on all three ESX hosts, and I can see the running VM's including stats.

    I've also tried manually setting the UUID Macro. Logged into one of the hosts via SSH, accessed the shell, got the host UUID via `cat /etc/vmware-vpx/instance.cfg`, added it as value for the {$VMWARE.HV.UUID} macro - Still getting the same errors.
    But from my understanding based on the template docs it shouldn't be neccessary to do so, since such a step isn't described.

    I guess that the Invalid second parameter. comes up because the UUID can't be found in the inherited Macro which than causes other data collection templates to fail since UUID is empty. Just a guess though.

    Does anyone have an idea on how to solve this? I'm running out of ideas at this point ...

    Thanks in advance to anyone who has an idea.

    Best regards and have an amazing day
    Last edited by jmbluethner; 07-01-2025, 18:42.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    I think if you are using that hypervisor template directly, then {$VMWARE.HV.UUID} should be defined on each host you create.

    By default that UUID is discovered and assigned to a hypervisor host, that is created based on host prototype, but as you are leaving this step out, then you need to define it manually.

    Comment


    • jmbluethner
      jmbluethner commented
      Editing a comment
      Thanks a lot for your reply!
      Unfortunately, I've already tried that without success. However, it might be possible that I got the wrong ID because, from what I can tell, there are a lot of different ways of obtaining the ID of an ESX host.
      Do you have any recommendation on how to get the correct ID for each ESX host? Would be highly appreciated!
      Best regards

    • jmbluethner
      jmbluethner commented
      Editing a comment
      Just to clarify - The correct way of doing things would be to autodiscover the ESX machines so that the host prototypes get applied? Am I getting that right?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #3
    The "vmware" template is meant to be assigned to a host, running vCenter. You just point it to a https://servername/sdk and it will pull (discover) all the info about the hypervisors (creates hosts based on prototype, assignes "hypervisor" template to those) from there already VM-s are discovered.

    Comment


    • jmbluethner
      jmbluethner commented
      Editing a comment
      Ooookay, got it! The problem is, that only 2 of 3 ESX Hosts are included in our vCenter
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #4
    I have not tried with directly communicating with ESX-es... but I guess if you provide correct ID and correct URL, it "should" work... At least docs say its possible... (The template "VMware Hypervisor" can be used in discovery as well as manually linked to a host.)

    Comment

    • jmbluethner
      Junior Member
      • Jan 2025
      • 2

      #5
      cyber I'm now writing replies instead of comments. Looks cleaner. I think? What's the best practice here?
      I've already tried to manually add the Host UUID via Macros, but maybe I did something wrong there. I'll try again that way as soon as I find time for that. Will keep the thread updated for later reference
      Thanks a lot so far!

      Edit: btw. mad respect for that username
      Last edited by jmbluethner; 09-01-2025, 16:55.

      Comment

      • sgtserge
        Junior Member
        • Oct 2023
        • 7

        #6
        Hi, got same problem today monitoring a standalone ESXi. Solved getting the correct UUID with this command from SSH in ESXi

        vim-cmd hostsvc/hostsummary | grep uuid

        Comment

        Working...