What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Executing PRTG API commands from PRTG

Votes:

0

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!

api prtg sensor

Created on Aug 26, 2020 4:52:56 PM

Last change on Aug 27, 2020 7:51:24 AM by  Florian Lesage [Paessler Support]



3 Replies

Votes:

0

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.

Created on Aug 28, 2020 7:46:07 AM by  Moritz Heller [Paessler Support]



Votes:

0

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.

Created on Aug 31, 2020 2:41:27 PM

Last change on Aug 31, 2020 6:52:22 PM by  Moritz Heller [Paessler Support]



Votes:

0

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

Created on Sep 1, 2020 8:11:03 AM by  Matthias Kupfer [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.