Ad Widget

Collapse

VMware discovery and conditional groups/templates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • freiheit
    Junior Member
    • Dec 2022
    • 11

    #1

    VMware discovery and conditional groups/templates

    Zabbix Version: 6.4.3 (mariadb)
    OS: Rocky9
    vCenter: 7.0.3

    Is there any way to conditionally add templates and host groups to VMs based on the information that Zabbix retrieves from vcenter?

    We have the "VMware FQDN" template working nicely. Was originally 6.2 version of the template, but updated the template to the version in 6.4.

    Examples of things I'd like to do:
    • If {#VM.GUESTFULLNAME} matches
      Code:
      (CentOS|Red Hat Enterprise Linux) [789]
      , assign our "Linux VMware VM by Agent" template.
    • If {#VM.GUESTFULLNAME} matches
      Code:
      FreeBSD 13.*
      , assign our "FreeBSD VMware VM by Agent" template.
    • If vcenter folder contains "AnotherDept", assign to host group "AnotherDept".
    • If vcenter folder does not match
      Code:
      AnotherDept1|AnotherDept2|AnotherDept3
      , assign to host group "OurDept".
    • If FQDN ends in
      Code:
      datacenter3.example.net
      , set location, longitude and latitude to the location of that datacenter (especially for hypervisors).
    • If FQDN matches regex
      Code:
      [a-z0-9]+\.fooservice\.[^.]+\.example.net
      , add the FooService template and the FooService host group.
    I know I can add templates by hand (including to an entire host group), but that's likely to miss new things. And can't add host groups to hosts discovered by Discover VMware VMs FQDN or Discover VMware hypervisors. And, obviously, we could give up on the vmware/vcenter-based monitoring of individual VMs and do everything on those VMs via the agent, but that would miss some useful data that I'd like to monitor.
    Last edited by freiheit; 22-06-2023, 02:48.
  • harlequinsmurf
    Junior Member
    • Mar 2025
    • 2

    #2
    Just starting my zabbix journey now and being able to add conditional hostgroups or templates based on data from discovery would be a valuable addition. Given that I'm necro'ing a post from almost 2 years ago with no responses I'm guessing it's not something that is possible.

    Comment

    Working...