New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


API Auto Delete Sensor Syntax

Votes:

0

Your Vote:

Up

Down

Hi, We have a scenario in our environment where I want to delete a sensor when its status changes to down. I know that deleting a sensor can be done through the API (I have used the API to auto-acknowledge certain sensors when they go down). I found the following information in the manual and have verified that it deletes a sensor when I replace the "objectid" with the ID of the sensor.

/api/deleteobject.htm?id=objectid&approve=1

The issue I am having is that I can't figure out the syntax for the API call to make it grab the Senor ID from the sensor that I have applied the notification template to. How would I adjust it to do this?

An example of a notification template that does this would be my Auto-Acknowledge one below. It pulls the sensorid into the API call it makes.

https://prtgmon.brotherhoodmutual.com/api/acknowledgealarm.htm?id=%sensorid&ackmsg=Auto-Acknowledged-via-Notification&username=XXXXXX&password=XXXXXXX

api delete notification

Created on Jul 1, 2019 3:30:32 PM by  jhallam (140) 1 2



1 Reply

Votes:

0

Your Vote:

Up

Down

Check out PRTGapi's Get-Trigger:
https://github.com/lordmilko/PrtgAPI/wiki/Notification-Triggers

Simply check for the corresponding triggers for the Sensors returned via Get-Sensor -Status Down and you should be good to go :)


PRTGapi | Feature Requests

Kind regards,
Stephan Linke, Tech Support Team

Created on Jul 1, 2019 6:35:21 PM by  Stephan Linke [Paessler Support]



Please log in or register to enter your reply.


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.