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

Changing the sensor status manually from OK to error

Votes:

0

Is there a way to change a sensor status from OK to Error - e.g. with API? Background: The notification is triggered when the number is greater than zero for more than 30 minutes. Then the sensor should also go to error... Unfortunately the sensor settings do not allow a time query - only a count.

api notfication state

Created on Jan 26, 2021 10:38:56 AM



1 Reply

Votes:

0

Hi Michel,

You can force a sensor to go into an error state by "simulating" an error

http://prtg.example.com/api/simulate.htm?id=1001&action=1&username=prtgadmin&password=prtgadmin

however any State Down notification triggers will simply report that the error was Simulated, rather than any actual error present on the sensor.

When designing notification trigger alerts, there are two variables you can play with: the scanning interval of the sensor, and (depending on the type of notification trigger used) the delay threshold.

For example, if you want a sensor to go red after 30 minutes, you could potentially have a scanning interval of 10 minutes, with an "If a Sensor Query Fails" of "Set sensor to warning for 2 intervals, then set to down". After 30 minutes of the sensor being in an error state, any notification triggers defined on the sensor would then be executed immediately. For State triggers, you can then of course an additional delay of when the actual notification should be sent out.

Using either method in isolation or combination ultimately allows you to achieve the same goal. Once you've identified the parameters you want to configure, you can then potentially batch apply these via the API.

Regards,

lordmilko

Created on Jan 26, 2021 11:34:27 AM




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.