Skip to content

Instantly share code, notes, and snippets.

@elico
Created March 7, 2025 22:09
Show Gist options
  • Save elico/ef9f3a0b9cedb34d182106c8a42a0241 to your computer and use it in GitHub Desktop.
Save elico/ef9f3a0b9cedb34d182106c8a42a0241 to your computer and use it in GitHub Desktop.
{
: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