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

Pause a TCP sensor when another is OK

Votes:

0

I have to systems, Main and Backup, and use a TCP sensor to monitor if an especific port is active, but only the Main is active so the same sensor in the backup system is always in fail. Only when Main fails the backups turns to active.

Its possible to add some kind of dependencies but negate, so when the TCP sensor in the Main system its OK, the TCP sensor in the backup system is paused, and when the main fails resume the TCP sensor in the backup system.

dependencies pause prtg tcp

Created on Mar 7, 2023 5:30:14 PM



1 Reply

Votes:

0

Hello there,

Sure, there is a way to achieve this. For this you will need to work with API calls and a notification template which uses the "Execute HTTP action" as notification method.

You can "pause" and "resume" a sensor using following API calls:


Pause
/api/pause.htm?id=objectid&pausemsg=yourmessage&action=0


Resume
/api/pause.htm?id=objectid&action=1

I have included the "Object Manipulation Manual" for further details. See link below: https://www.paessler.com/manuals/prtg/object_manipulation#pause_resume

For your notification template you will need to enable the "Execute HTTP action" and adjust the API calls above and replace the objectid with the sensor ID.

Now you can configure the notification trigger with a notification template which pauses the other sensor to be triggered when sensor status is "UP".


This means that when the sensor goes up, PRTG will execute the HTTP action.
To resume the paused sensor in case when the main is down, you will need to setup a second notification trigger to be triggered when sensor status is "DOWN".


Of course you will need to repeat the same for your backup sensor.

I have included a detailed PRTG Manual: on "Notification Triggers Settings". Find link below: https://www.paessler.com/manuals/prtg/sensor_notifications_settings

Furthermore, I have attached a PRTG Manual for Notification Templates as well. See link below. https://www.paessler.com/manuals/prtg/notifications_settings


Kind regards
Jeremiah Katatumba - Technical Support

Created on Mar 9, 2023 10:48:15 AM by  Jeremiah Katatumba

Last change on Mar 9, 2023 11:47:21 AM by  Jeremiah Katatumba




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.