[ZBXNEXT-1128] Add support for {IPADDRESS} macro in Trigger URL Created: 2012 Feb 19  Updated: 2015 Dec 30  Resolved: 2015 Feb 12

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F), Server (S)
Affects Version/s: 1.8.9
Fix Version/s: 2.5.0

Type: New Feature Request Priority: Minor
Reporter: Kevin Doren Assignee: Unassigned
Resolution: Fixed Votes: 7
Labels: macros, patch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File zabbix-2.2.5-ZBXNEXT-1128-1.patch     File zabbix-2.2.5-ZBXNEXT-1128-2.patch     File zabbix-2.2.5-ZBXNEXT-1128-3.patch     File zabbix-2.2.5-ZBXNEXT-1128.patch    
Issue Links:
Duplicate
is duplicated by ZBXNEXT-1176 Ability to use a macro like {HOST.CON... Closed
is duplicated by ZBXNEXT-2149 Add support for macro's in URL field ... Closed

 Description   

HP SNMP agents present a "System Management Homepage" at the host's IP address, https: port 2381. It would be convenient if we could use

{IPADDRESS}

in a Trigger URL, then it would take us directly to the page. Triggers are templated, and mass update doesn't support Trigger URLs, so it's not practical to manually add url to each trigger.

In other scenarios, it would be useful to support macros for the IPMI Address or HOST.CONN or HOST.DNS

Specification



 Comments   
Comment by hamid sfandiari [ 2012 Apr 19 ]

also we could use the address like "ssh://root@{HOST.CONN}"
but the macros is not allowed

Comment by Chris Warren [ 2012 Oct 04 ]

I'll second this request. I'd love to be able to avoid having to add the individual host IP in the template URL.

Comment by Isamu D [ 2014 Feb 07 ]

Please implement this.

Comment by Marc [ 2014 Feb 15 ]

ZBXNEXT-2149 asks for general macro resolution in trigger url.

Comment by Volker Fröhlich [ 2014 Sep 15 ]

POC patch for ZBXNEXT-1128 in 2.2.5 (macro resolution in trigger URL)

The resolved macros are:

  • User macros
  • Interface macros
  • Host macros
  • Item macros

It's a frontend side implementation only!

Comment by Volker Fröhlich [ 2014 Sep 18 ]

Corrected version

  • resolveTriggerUrl() is now a class method
Comment by Volker Fröhlich [ 2014 Sep 23 ]

TRIGGER.ID was no longer resolved

Comment by Volker Fröhlich [ 2014 Sep 24 ]

Get rid of errors on overview trigger page, due to undefined expression key

Whether that key should be there in the first place or not, I don't know.

Comment by Igors Homjakovs (Inactive) [ 2014 Dec 02 ]

Server side has been fixed in svn://svn.zabbix.com/branches/dev/ZBXNEXT-1128

Comment by Igors Homjakovs (Inactive) [ 2014 Dec 02 ]

(1) Frontend side has to be fixed as well

sasha RESOLVED in r51942.

iivs CLOSED.

Comment by Alexander Vladishev [ 2014 Dec 04 ]

(2) Made some minor changes in r51017:51018. Please review.

igorsh Thank you. Looks good. CLOSED.

Comment by Alexander Vladishev [ 2014 Dec 05 ]

(3) Fixed resolving of user macros in r51020. Please review.

igorsh Thank you. Looks good. CLOSED.

Comment by Ivo Kurzemnieks [ 2015 Feb 06 ]

(4) [F] String changes?

sasha No string shanges. RESOLVED

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2015 Feb 06 ]

(5) [F] Sceens and slideshows with Trigger overview block in menu popup do not expand URLs.

sasha RESOLVED in r52059.

iivs 'triggerid' was already in request. I removed duplicate and sorted fields in same order as they appear in DB. Please, see my changes in r52065

sasha Thanks a lot! CLOSED

Comment by Ivo Kurzemnieks [ 2015 Feb 06 ]

(6) [F] events.php: 741 'triggerid' is not in the output, but it is required later in popup menu helper. Please, check. We can also move 'output' to be the first option.

sasha RESOLVED in r52057.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2015 Feb 06 ]

(7) [F] Please, add a commentary for CMacrosResolverHelper::resolveTriggerUrl() that $triggers should come with already IDs in the array keys. Otherwise if we forget 'preservekeys' in API calls, it will break something.

sasha RESOLVED in r52058.

iivs CLOSED.

Comment by Alexander Vladishev [ 2015 Feb 06 ]

(8) [S] {HOST.ID<1-9>} macros are not resolved in trigger URL

sasha RESOLVED in r52060.

iivs Checked, looks good and works. CLOSED.

Comment by Ivo Kurzemnieks [ 2015 Feb 09 ]

TESTED,
but don't forget to close (5) before merging.

Comment by Alexander Vladishev [ 2015 Feb 09 ]

Available in pre-2.5.0 r52093.

Comment by Alexander Vladishev [ 2015 Feb 09 ]

(9) Documentation:

sasha RESOLVED

martins-v Reviewed. I changed the wording in 'what's new' slightly and added the info to https://www.zabbix.com/documentation/3.0/manual/config/triggers/trigger#configuration as well.

sasha Thanks a lot! CLOSED

iivs

REOPENED.

sasha RESOLVED

iivs Thanks! CLOSED.

Generated at Thu Apr 18 21:09:49 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.