How do we reference then Proxy or {PROXY.NAME} in an item key ?
We have a item using the Zabbix Agent Active, and in the key we want to pass in if the host proxy value, to determine if the hosts is sending data back to the server or to a proxy.
However it seems the Macro does not expand when used in a item key.
Key = zbx.run[PING,{PROXY.NAME}]
/etc/zabbix/zabbix_agent2.d/zabbix_agent2.userparams.conf
# USER-DEFINED MONITORED PARAMETERS #
UserParameter=zbx.run[*],/apps/zabbix/zbx-run $1 $2
if [ "${1}" = "PING" ]
then
if [ "${2}" = "" ]
then
echo "Ping Zabbix Server"
else
echo "Ping Zabbix Proxy"
fi
fi # PING
We have a item using the Zabbix Agent Active, and in the key we want to pass in if the host proxy value, to determine if the hosts is sending data back to the server or to a proxy.
However it seems the Macro does not expand when used in a item key.
Key = zbx.run[PING,{PROXY.NAME}]
/etc/zabbix/zabbix_agent2.d/zabbix_agent2.userparams.conf
# USER-DEFINED MONITORED PARAMETERS #
UserParameter=zbx.run[*],/apps/zabbix/zbx-run $1 $2
if [ "${1}" = "PING" ]
then
if [ "${2}" = "" ]
then
echo "Ping Zabbix Server"
else
echo "Ping Zabbix Proxy"
fi
fi # PING
Comment