Ad Widget

Collapse

parameters on an action script at host discovery time with actions and mediatype

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jhoogie
    Junior Member
    • Aug 2026
    • 3

    #1

    parameters on an action script at host discovery time with actions and mediatype

    Hello,

    I am a but struggling with my setup.
    My goal is to discover network devices on a subnet and based on the type create an item for it in Zabbix with the template etc and also register the device in PHPIPAM
    That first part works great.
    Just create the discovery rule and bind it to a discovery action.
    The hostname is based on the data I retrieved with the snmp querie and fetching .1.3.6.1.2.1.1.5.0 from the device which is the hostname
    But now the fun part.
    I want to also populate my external IPAM with at least the ip address and hostname
    It seems that using a mediatype and call my pythonscript should work.
    The mediatype currently has "phpipam_add_host.py" as script with {DISCOVERY.DEVICE.IPADDRESS} {DISCOVERY.DEVICE.DNS}

    Click image for larger version

Name:	Screenshot 2026-08-02 at 12.16.04.png
Views:	9
Size:	106.8 KB
ID:	515592

    That works, but only when reverse dns is populated for this device, if there is no reverse dns record than the {DISCOVERY.DEVICE.DNS} is empty
    In IPAM I do get the ip address registered, but no hostname
    I am facing the challenge that I want to use the value read with .1.3.6.1.2.1.1.5.0 as discovery item for the hostname, but I do not see what parameter value could be used.
    From what I understand there is no such thing as {hostname} as the host is not yet created completely in Zabbix.
    Any ideas on how to set this up?

    John
    Attached Files
Working...