-
Change Request
-
Resolution: Fixed
-
Trivial
-
None
-
None
-
Sprint 70 (Nov 2020), Sprint 71 (Dec 2020), Sprint 72 (Jan 2021), Sprint 73 (Feb 2021)
-
6
Summary
Current functionality of global scripts allows execution of shell scripts and IPMI commands only. Nowadays, when most services provide HTTP based APIs it is rather limiting. It would be great if global scripts supported custom logic written in JavaScript with ability to call external HTTP services.
Acceptance
- Zabbix global scripts must be extended to allow execution of pre-defined JavaScript code
- A new type "Webhook" must be introduced, it must be implemented similarly to Webhooks used for media types:
- JavaScript code must have ability to communicate to external services using HTTP(S) protocol
- Parameters must support event related macros
- The following parameters must be supported for "Webhook" type of scripts
- Parameters: optional list of parameters for JavaScript code (none by default)
- Script: JavaScript code
- Timeout: maximum allowed script execution time, 30s by default
- A new type "Webhook" must be introduced, it must be implemented similarly to Webhooks used for media types:
- It must be possible to execute global scripts of type "Webhook" manually from host and event context menus in Zabbix UI (depending on configuration) and also use it in action operations
- Zabbix must replace all macros used in parameters with real values before executing JavaScript code
Use cases
- I do not want to rely on external shell scripts for HTTP calls, give me support of JavaScript for global scripts
Decisions made
- Import/export functionality of global scripts is out of scope
- causes
-
ZBX-18916 [Administration - Scripts - Webhook] Trailing spaces in parameters should be trimmed
-
- Closed
-
- depends on
-
ZBXNEXT-6143 Increase allowed global script length
-
- Closed
-
- part of
-
ZBXNEXT-6368 Move SSH/Telnet/IPMI/Script operations to Global Scripts
-
- Closed
-
There are no Sub-Tasks for this issue.