We are trying to setup a backup for our main monitoring tool for our network. If it goes down, we want PRTG to be able to take over the monitoring. I don't see a way to enable/disable notifications for a group based on the status of another sensor. So I was thinking I could setup a group with the notifications already in place, pause it, and then if a sensor goes down, it sends a PRTG API command to unpause the group. And when the sensor returns to normal status, it pauses the group again.
I was trying to use the HTTP Action to unpause using the API, but it doesn't work. The log shows this: State Trigger sending HTTP (Sensor/Source/ID: 35491/35490/2), no errors.
The notification template is setup like this: URL: http://prtg.mydomain.com/api/pause.htm?id=35491&action=1&username={username}&passhash={passhash} SNI (Server Name Indication): Do not send SNI (default) HTTP Method: GET (x) POST PUT PATCH Payload ____
Any suggestions would be much appreciated! Thanks!
Article Comments
If I put this in my web browser, it unpauses the group like it is supposed to. http://prtg.serverdomain.com/api/pause.htm?id=35722&action=1&username=USERNAME&passhash=PASSHASH
I have tried setting the HTTP Method to POST and also PUT, and neither of them work.
Aug, 2020 - Permalink
Hello,
I have removed your screenshot, because it includes confidential information. Please do not post any confidential information here, because its public. If you want, or have to, share any confidential information with us, please open a support ticket.
You will have to use the Method GET in your HTTP notification, when calling the PRTG API.
Please also double check the dns-hostname, id, username and passhash you have set in the notification template for any typos.
Kind regards,
Matthias Kupfer - Team Tech Support
Sep, 2020 - Permalink
Hi there,
Did you already tried to enter the used URL in the browser to check whether this API call works? Please use a private tab in your browser so that no active user session will be used.
Aug, 2020 - Permalink