Hello Guys ... i'm actually monitoring some devices that, from my Zabbix Server point of view, have all the same IP address. Each host points to the "other side" firewall IP address and an specific SNMP port, that will be forwarded to the real internal IP of that device. It's working fine, pretty simple setup, hosts are created with SNMP interface, IP, port and community.
Now i'm trying to get some external checks to run against these hosts. I understood how to create a script at "/usr/lib/zabbix/externalscripts", how to call it from the Key field, for example:
myscript.sh["{HOST.CONN}"]
What I'm really struggling to acchieve is, at the item on the Template (on the Template I don't know IP address, SNMP port and community), how to inform the correct parameters for the script. The host IP address can be easily acchieved with HOST.CONN, but I really don't know how to call for the SNMP Community (which might be different from $SNMP_COMMUNITY, but always correctly informed on the host entry) and also SNMP port.
I'm really not looking to create MACROs on each host with the values, I was really trying to be able to "recover" those vsomehow, but I really couldn't find how to do it.
Is that, getting SNMP Community and SNMP port, via some macro or variable, possible on the Item creation (on the template)?
Thanks and hope I made myself clear enough ...
Now i'm trying to get some external checks to run against these hosts. I understood how to create a script at "/usr/lib/zabbix/externalscripts", how to call it from the Key field, for example:
myscript.sh["{HOST.CONN}"]
What I'm really struggling to acchieve is, at the item on the Template (on the Template I don't know IP address, SNMP port and community), how to inform the correct parameters for the script. The host IP address can be easily acchieved with HOST.CONN, but I really don't know how to call for the SNMP Community (which might be different from $SNMP_COMMUNITY, but always correctly informed on the host entry) and also SNMP port.
I'm really not looking to create MACROs on each host with the values, I was really trying to be able to "recover" those vsomehow, but I really couldn't find how to do it.
Is that, getting SNMP Community and SNMP port, via some macro or variable, possible on the Item creation (on the template)?
Thanks and hope I made myself clear enough ...


Comment