C
C
CanisLupusMSK2021-04-12 21:12:39
Zabbix
CanisLupusMSK, 2021-04-12 21:12:39

How to run custom script in zabbix 5.2?

There is a zabbix and a router from which zabbix takes metrics via snmp. You need to make a notification about the unavailability of a certain host through the script:
#!/bin/bash
curl --insecure -X POST --data-urlencode 'payload={"channel":"#officeit_alert","username":"Test"," attachments": [{"text": ":bangbang: \n\nTest"}]}' XXXXXXXXXX
How is this possible? The trigger exists and works, but I don’t understand where to insert the script.
60748df27b5fa646638986.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2021-04-12
@CanisLupusMSK

Administration > Media Types. Inside, add a new type "Script", specifying its name and mapping the necessary parameters. The script must be in the directory specified in the AlertScriptsPath.
https://www.zabbix.com/documentation/current/manua...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question