Hi all
I use zabbix server 3.4 and zabbix agents 3.2
I need to tune several hosts to slightly different value of e.g. time when zabbix-agent is unreachable.
T accomplish that I set up new macro {$TIME_UNREACHABLE} and replaced default expression:
{Template App Zabbix Agent:agent.ping.nodata(5m)}=1
with:
{Template App Zabbix Agent:agent.ping.nodata({$TIME_UNREACHABLE}m)}=1
Unfortunately zabbix raise a syntax error due to merging macro and unit. So I decided to pass this value in seconds so now expression is:
{Template App Zabbix Agent:agent.ping.nodata({$TIME_UNREACHABLE})}=1
and macro specified with seconds. Everything works now but there is other issue.
The name of trigger is:
Zabbix agent on {HOST.NAME} is unreachable for 5 minutes
so I decided to change it too. Now it is like this:
Zabbix agent on {HOST.NAME} is unreachable for {$TIME_UNREACHABLE}/60 minutes
The issue is that zabbix doesn't evaluate this expression and prints:
Zabbix agent on {HOST.NAME} is unreachable for 300/60 minutes
That's not perfect solution and printing values in seconds is not satisfying either...
Somebody know better solution?
I use zabbix server 3.4 and zabbix agents 3.2
I need to tune several hosts to slightly different value of e.g. time when zabbix-agent is unreachable.
T accomplish that I set up new macro {$TIME_UNREACHABLE} and replaced default expression:
{Template App Zabbix Agent:agent.ping.nodata(5m)}=1
with:
{Template App Zabbix Agent:agent.ping.nodata({$TIME_UNREACHABLE}m)}=1
Unfortunately zabbix raise a syntax error due to merging macro and unit. So I decided to pass this value in seconds so now expression is:
{Template App Zabbix Agent:agent.ping.nodata({$TIME_UNREACHABLE})}=1
and macro specified with seconds. Everything works now but there is other issue.
The name of trigger is:
Zabbix agent on {HOST.NAME} is unreachable for 5 minutes
so I decided to change it too. Now it is like this:
Zabbix agent on {HOST.NAME} is unreachable for {$TIME_UNREACHABLE}/60 minutes
The issue is that zabbix doesn't evaluate this expression and prints:
Zabbix agent on {HOST.NAME} is unreachable for 300/60 minutes
That's not perfect solution and printing values in seconds is not satisfying either...
Somebody know better solution?
Comment