[ZBXNEXT-3400] Allow use of {HOST.*} macros in trigger expressions Created: 2016 Aug 24  Updated: 2021 Oct 27

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F), Server (S)
Affects Version/s: 3.0.4
Fix Version/s: None

Type: New Feature Request Priority: Trivial
Reporter: Raymond Kuiper Assignee: Unassigned
Resolution: Unresolved Votes: 21
Labels: macros
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBX-13207 Cant compare string latest data with ... Closed

 Description   

I'm trying to build a trigger to verify if the configured hostname in the zabbix_agentd.conf file (via the agent.hostname item key) matches the technicalname which is configured in Zabbix ({HOST.HOST}).

Unfortunately, this macro cannot be used as a parameter for the str() or regexp() trigger functions.
Please allow support of the following macros in trigger expressions:

  • {HOST.HOST}
  • {HOST.NAME}
  • {HOST.PORT}


 Comments   
Comment by Raymond Kuiper [ 2016 Aug 24 ]

{HOST.CONN} might prove useful too.

Comment by patrik uytterhoeven [ 2019 Feb 26 ]

add {HOST.IP} to the list

imho there should be no restriction to the macros allowed to be used

Comment by Fabrice T [ 2019 May 20 ]

its so frustating !

 

this one didn't work :  agent.hostname.count(#2,{HOST.HOST},ne*)*}=2

 

Any idea to resolve this issue ?

Comment by Justin Addams [ 2021 Oct 22 ]

There's a few situations where we are having to make a User Macro with the exact same contents as a built in macro for to use in a Trigger Expression.

This feature would be very helpful.

Comment by Joe Camadine [ 2021 Oct 27 ]

We are also looking to use {HOST.LOCATION.LAT} and {HOST.LOCATION.LON} to gather weather data from a webapi .. works great with manual created user macros but not the LAT/LON.

Generated at Thu Mar 28 14:06:22 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.