Hello,
I noticed recently that in Zabbix 2.2.3 if you link a template with macros defined to a host and the macros are used in trigger definition, you also have to double the macros on the host too.
For example:
The template named "Template_Solaris_memory" has a trigger with this definition:
{Template_Solaris_memory:swap.info[percent_free].prev(0)}<{$SWAP_ALERT_THRESHOLD} & {Template_Solaris_memory:swap.info[percent_free].last(0)}<{$SWAP_ALERT_THRESHOLD}
Where {$SWAP_ALERT_THRESHOLD} is defined as macro in the template with a value of 10.
Applying this template to a host without defining the same macro on the host will result in an unknown status:
{host1.ecample.com:swap.info[percent_free].prev(0)}<{$SWAP_ALERT_THRESHOLD} & {host1.example.com:swap.info[percent_free].last(0)}<{$SWAP_ALERT_THRESHOLD}
"Invalid expression [{1300100000001790}<{$SWAP_ALERT_THRESHOLD}&{130010 0000001791}<{$SWAP_ALERT_THRESHOLD}]"
Is this the normal behavior in zabbix 2.2 or possibly a bug?
I noticed recently that in Zabbix 2.2.3 if you link a template with macros defined to a host and the macros are used in trigger definition, you also have to double the macros on the host too.
For example:
The template named "Template_Solaris_memory" has a trigger with this definition:
{Template_Solaris_memory:swap.info[percent_free].prev(0)}<{$SWAP_ALERT_THRESHOLD} & {Template_Solaris_memory:swap.info[percent_free].last(0)}<{$SWAP_ALERT_THRESHOLD}
Where {$SWAP_ALERT_THRESHOLD} is defined as macro in the template with a value of 10.
Applying this template to a host without defining the same macro on the host will result in an unknown status:
{host1.ecample.com:swap.info[percent_free].prev(0)}<{$SWAP_ALERT_THRESHOLD} & {host1.example.com:swap.info[percent_free].last(0)}<{$SWAP_ALERT_THRESHOLD}
"Invalid expression [{1300100000001790}<{$SWAP_ALERT_THRESHOLD}&{130010 0000001791}<{$SWAP_ALERT_THRESHOLD}]"
Is this the normal behavior in zabbix 2.2 or possibly a bug?