Created
March 7, 2025 22:09
-
-
Save elico/ef9f3a0b9cedb34d182106c8a42a0241 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
:local gotifyToken "testToken"; | |
:local gotifyEndpointUrl "https://gotify.example.org/mesasge"; | |
:local serviceName "web service"; | |
:local source "Device 1234"; | |
:local state "TEST"; | |
:local state "DOWN"; | |
:local state "UP"; | |
:local httpData "{ \"title\": \"Netwatch Message\", \"message\": \"$source : $serviceName is $state\" }"; | |
/tool fetch url=$gotifyEndpointUrl http-data="$httpData" \ | |
http-header-field="X-Gotify-Key:$gotifyToken,content-type:application/json" \ | |
http-method=post mode=https output=none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment