Community discussions

MikroTik App
 
elixx
just joined
Topic Author
Posts: 10
Joined: Fri Mar 29, 2019 8:41 pm

(Solved) Mattermost webhook notifications

Fri Mar 29, 2019 8:47 pm

I am running a VM with 6.44.1 Stable and The Dude server. I have been using The Dude for several years, and can't seem to figure out where the failure is. I think I've found a bug.

If I run the following command from a Terminal on the device, it works fine.
But, if I have a Dude notification set up for "execute locally", it never runs.
/tool fetch mode=https url="https://domain.com/url/path" http-method=post http-data="{\"text\": \":icon: Service ([Probe.Name]) on ([Device.Name]) is now **([Service.Status])**\", \"channel\": \"sandbox\", \"username\": \"dude\"}" http-header-field="content-type: application/json"
It works flawlessly from the command-line -- I think the Dude might be mangling the string after variable substitution? Any way to see some error output? I don't see anything in my logs. Nothing is received on the remote end.
Last edited by elixx on Sat Jun 27, 2020 5:16 pm, edited 2 times in total.
 
elixx
just joined
Topic Author
Posts: 10
Joined: Fri Mar 29, 2019 8:41 pm

(Solved) Re: Problem with 'Execute locally' Notification

Sat Jun 27, 2020 5:05 pm

I need to use "Execute on Server " not "Execute locally". Matter of perspective :)

/tool fetch mode=https url="https://mattermost.example.com/hooks/WEBOOKID" http-method=post http-data="{\"text\": \":v2: `[Device.Name]`: `[Probe.Name]` is now **[Service.Status]** -- `([Service.ProblemDescription])` Last changed: `[Service.TimeSinceChanged]`\", \"channel\": \"sandbox\", \"username\": \"TheDude\"}" http-header-field="content-type: application/json"

Who is online

Users browsing this forum: No registered users and 11 guests