From c7041d5f3253d2ce3f13fd2ed9aa02ee4391920f Mon Sep 17 00:00:00 2001 From: Thomas Trautwein Date: Mon, 21 Oct 2024 12:07:04 +0200 Subject: [PATCH] Updated version to 7.0 --- zabify-mediatype.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zabify-mediatype.json b/zabify-mediatype.json index 6536961..7352970 100644 --- a/zabify-mediatype.json +++ b/zabify-mediatype.json @@ -1,6 +1,6 @@ { "zabbix_export": { - "version": "6.4", + "version": "7.0", "media_types": [ { "name": "Zabify", @@ -47,7 +47,7 @@ } ], "script": "try {\n Zabbix.log(4, '[ Zabify ] Starting to send push notification');\n\n var params = JSON.parse(value);\n var payload = {\n \"token\": params.send_to.split(\"===\")[1],\n \"rsaKey\": params.send_to.split(\"===\")[0],\n \"notification\": {\n \"data\": {\n \"host_id\": params.host_id,\n \"event_id\": params.event_id,\n \"severity\": parseInt(params.severity)\n },\n \"message\": { \n \"title\": params.title,\n \"message\": params.message,\n }\n }\n };\n\n Zabbix.log(4, '[ Zabify ] Sending request');\n var request = new HttpRequest();\n request.addHeader('Content-Type: application/json');\n request.setProxy(params.proxy);\n\n var data = JSON.stringify(payload);\n var endpoint = params.protocol + \"://\" + params.fully_qualified_name + \":\" + params.port + \"/send\";\n var response = request.post(endpoint, data);\n if (response === null) {\n throw 'Unknown error. Check debug log for more information.';\n }\n Zabbix.log(4, '[ Zabify ] Received response with status code ' + request.getStatus() + '\\n' + response);\n\n if (request.getStatus() != 200) {\n var parsedResponse;\n try {\n parsedResponse = JSON.parse(response);\n }\n catch (error) {\n Zabbix.log(4, '[ Zabify ] Failed to parse response');\n throw 'Unknown error. Check debug log for more information.';\n }\n\n throw parsedResponse;\n }\n\n Zabbix.log(4, '[ Zabify ] Finished to send push notification without errors');\n return 'OK';\n}\ncatch (error) {\n Zabbix.log(4, '[ Zabify ] Failed to send push notification: ' + error);\n throw 'Zabbix app notification failed: ' + error;\n}", - "description": "Please refer to the Zabify integration documentation on https://www.zabify.de/plugin for more information.", + "description": "Please refer to the Zabify Server integration documentation on https://www.zabify.de/plugins for more information.", "message_templates": [ { "event_source": "TRIGGERS",