Ad Widget

Collapse

Automatically add hosts to groups and link to templates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NogNeetMachinaal
    Junior Member
    • May 2016
    • 6

    #1

    Automatically add hosts to groups and link to templates

    Hi Everyone,

    I’m trying to get auto discovery working to the extent that it will assign a basic set of templates to the different devices. For example, add the discovered Linux servers to the corresponding host group and link the host to the templates “Zabbix agent” and “Linux OS”. Similar for Windows servers and network devices.

    Under “Configuration | Actions” I have created discovery rules and operations for adding a host to the designated host group and link it to one or more templates.
    The used conditions are “Received value like <host-type>” and “Discovery status = up”. Where <host-type> equals Linux or Windows; all of which have the Zabbix agent installed.
    For network devices, I used the phrase switch or router. These words where found @ the MIB-entry iso.3.6.1.2.1.1.1.0 via snmpwalk.

    From the created rules, a generic discovery rule with just “Discovery status = up” seems to work fine. It adds hosts to the group titled “Discovered hosts” and link them to the ICMP template. Which is exactly as expected!

    Strangely enough, the approach with “Received value like <host-type>” also seems to work for the ESX hosts with the phrase ESX; they are added to the group Hypervisors and linked to the VMware Hypervisor template.

    However, while all other servers are added to the right group, none of the pre-configured templates in the operations section are linked to the respective hosts. In addition, the network devices are not even added to their designated group.

    Does this ring any bells to someone?
    What am I missing/overlooking here?


    Thank you - Will
  • colin88
    Junior Member
    • Dec 2016
    • 13

    #2
    I had similar issues a while ago. For information about auto registration via the zabbix agent take a look at this:

    The section "Using host metadata" worked fine for me.

    If i got you right you're trying to link a discovered host to the corresponding OS Template AND the Zabbix Agent Template, am i correct? This didn't work properly for me either at first. I think the problem was that the Zabbix Agent Template is already linked to the OS template and therefore cannot be linked a second time. Linking only the OS template worked fine for me.

    Hope this will help,
    Ben

    Comment

    Working...