improvements to the user macro functionality (ZBXNEXT-353)

[ZBXNEXT-751] Allow user macros within notification messages Created: 2011 Apr 14  Updated: 2017 May 31  Resolved: 2014 Mar 21

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: 1.8.4
Fix Version/s: 2.3.0

Type: Change Request (Sub-task) Priority: Minor
Reporter: Cohan Robinson Assignee: Unassigned
Resolution: Fixed Votes: 9
Labels: flexibility, notification, trivial, usermacros
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBXNEXT-1035 User macro evaluation in action messa... Closed
is duplicated by ZBXNEXT-1094 Support for user defined macros subst... Closed

 Description   

It would be nice to have user macros usable within notification messages.

As an example a host goes ping down, you have a macro {$GATEWAY} set that contains the host's gateway IP. When sending an alert it could then include the gateway IP amongst other information when opening the ticket



 Comments   
Comment by Raymond Kuiper [ 2011 Apr 14 ]

Agreed, user macros are very powerfull and could virtually be used anywhere.

Comment by Oleksii Zagorskyi [ 2012 Jan 27 ]

For the record, that's useful for remote commands too.

Comment by Pavel Timofeev [ 2012 Dec 05 ]

Another example from my life:

I have macro {$UNIX_ADMINS}=>"John Doe, Jane Roe and Pavel Timofeev".
I added new trigger (for ex., "Free memory on

{HOST.NAME}

") and wrote in its comment/description following phrase:

"If you've received this message please call {$UNIX_ADMINS}!"

Then I created action where I defined conditions and wrote in body

{TRIGGER.NAME}

:

{TRIGGER.STATUS}

Last value:

{ITEM.LASTVALUE} {TRIGGER.COMMENT}

(or

{TRIGGER.DESCRIPTION}

)

as result we would get in body:

Free memory on server1: PROBLEM
Last value: 5%
If you've received this message please call John Doe, Jane Roe and Pavel Timofeev!

If user macro worked in this case it would be very useful.
We have day and night duty officers that have to respond on any messages from our monitoring system.

Comment by Pavel Timofeev [ 2012 Dec 05 ]

Hmm, I've just figured out that neither of macros works in my case.

So should I fill new ZBXNEXT about any macros in

{TRIGGER.COMMENT}

in nofitications?

Comment by Nikolajs Agafonovs (Inactive) [ 2014 Mar 18 ]

Available in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-751

Comment by Alexander Vladishev [ 2014 Mar 18 ]

(1) documentation

sasha Accepted by martins-v. CLOSED

Comment by Rodrigo Mosconi [ 2014 Mar 18 ]

I don`t have permission to view this links.

Comment by richlv [ 2014 Mar 18 ]

that's current "in progress" documentation which is not open to public yet - we'll probably open it in the next few days

Comment by richlv [ 2014 Mar 19 ]

ok, so 2.4 docs are public now

Comment by Alexander Vladishev [ 2014 Mar 21 ]

Available in version pre-2.3.0 (trunk) r43639.

Comment by richlv [ 2014 Mar 21 ]

subissue (1) not closed

nikolajs.agafonovs CLOSED

Generated at Fri Apr 26 04:31:10 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.