[ZBXNEXT-6796] Allow to pass event macros to Media type: Script Created: 2021 Jul 22  Updated: 2024 Apr 10  Resolved: 2023 Feb 19

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: 5.0.14
Fix Version/s: 6.4.0rc1, 6.4 (plan)

Type: New Feature Request Priority: Major
Reporter: Aigars Kadikis Assignee: dimir
Resolution: Fixed Votes: 5
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File image-2021-07-22-17-53-15-776.png     PNG File image-2021-07-22-17-55-34-553.png     PNG File screenshot-1.png     XML File zbx_export_mediatypes.xml    
Issue Links:
Duplicate
is duplicated by ZBXNEXT-3185 Extend Argument support for script me... Closed
is duplicated by ZBXNEXT-6227 Macro {EVENT.ID} not supported anymor... Closed
Sub-task
Sub-Tasks:
Key
Summary
Type
Status
Assignee
ZBXNEXT-8203 Frontend changes to allow to pass eve... Specification change (Sub-task) Closed Alexander Shubin  
Team: Team A
Sprint: Sprint 96 (Jan 2023), Sprint 97 (Feb 2023)
Story Points: 6

 Description   

Currently, we have an option to pass these build-in macros to script:

{ALERT.SENDTO}
{ALERT.SUBJECT}
{ALERT.MESSAGE}

Please allow event macros to be passed too:

{EVENT.NSEVERITY} 
{EVENT.VALUE}
{TRIGGER.ID}
{EVENT.ID} 
{EVENT.DATE} 
{EVENT.TIME} 
{EVENT.RECOVERY.DATE} 
{EVENT.RECOVERY.TIME} 
{EVENT.OPDATA} 
{EVENT.AGE} 

In this manner:



 Comments   
Comment by dimir [ 2023 Jan 31 ]

Initial version available in development branch feature/ZBXNEXT-6796-6.3

What's missing:

  • complete database changes (currently only adds media_type_param.sortorder column)
  • upgrade patch
Comment by dimir [ 2023 Feb 02 ]

For QA, in addition, please check that scheduled PDF report functionality was not broken by introducing this functionality.

Comment by dimir [ 2023 Feb 03 ]

Ready for QA.

Comment by dimir [ 2023 Feb 03 ]

QA: API successfully tested.

Comment by dimir [ 2023 Feb 03 ]

Fixed in:

Before this functionality in Script Mediatype parameters you could only use 3 macros:

  • {ALERT.SENDTO}
  • {ALERT.SUBJECT}
  • {ALERT.MESSAGE}

After this functionality all the macros supported currently in all type of notifications will be supported in Script Mediatype parameters parameters as well. This includes:

  • problem
    • problem event notifications
    • recovery event notifications
    • problem update notifications
  • network discovery
    • network discovery notifications
  • auto-registration
    • auto-registration notifications
  • internal event
    • internal item-based notifications
    • internal lld-rule-based notifications
    • internal trigger-based notifications
  • service
    • service-based notifications
Comment by Marina Generalova [ 2023 Feb 07 ]

Documentation updated:

Generated at Thu Apr 24 07:01:22 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.