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


Extract "Auto Acknowledge" setting from all sensors via API

Votes:

1

Your Vote:

Up

Down

Hi,

When we have a sensor that is bouncing up and down we change the "auto Acknowledge" setting to "Show Down Acknowledged". Once the issue has been resolved we change this setting back to "Show down status on error. Unfortunately over time this second step isnt always done.

Therefore, I would like to query all sensors to see what the auto acknowledge setting is on them all.

Is there any way I can do this via the API?

Is there any way I can extract this data from the back end database?

Cheers, Phil

api auto-acknowledge prtg

Created on Sep 2, 2016 10:13:20 AM by  Phil Evans (1) 1



Best Answer

Accepted Answer

Votes:

0

Your Vote:

Up

Down

Here's a modification of my earlier referenced Powershell script that does what you want for ping sensors: https://gist.github.com/markwragg/02a91560f46210cf67ca5c810681f6ae

It seems to work when tested against my environment, you get a CSV result of sensor details and the value of the AutoAck setting as an additional column, but you could change the script to do whatever you need with the object output.

Created on Sep 2, 2016 1:14:48 PM by  Mark Wragg (140) 1



4 Replies

Votes:

0

Your Vote:

Up

Down

I just wrote a Powershell script for auditing the URL settings of Transaction sensors via the API using Powershell. The trickiest part was working out the name of the property I wanted to audit, as the API documentation doesn't list these explicitly anywhere but they should be the same as or similar to what ever the setting is named.

To see how my script works see here: http://wragg.io/get-transaction-sensor-url-settings-from-prtg-with-powershell/

I'll do a little experimenting to see if I can work out the property name you need for you.

Created on Sep 2, 2016 1:00:31 PM by  Mark Wragg (140) 1



Votes:

0

Your Vote:

Up

Down

Dear Phil

You can read out the auto-acknowledge setting for a sensor. Lets say the sensor ID is 2002, the according API call looks like

api/getobjectproperty.htm?id=2002&name=autoacknowledge

The result always inludes the PRTG version, and the value (here: 0 = off, 1 = on.)

To get a list of the IDs of all ping sensors, use

/api/table.csv?id=0&content=sensors&columns=objid,name&count=*&filter_type=ping

To get an XML instead, which is easier to use in powershell, replace table.csv with table.xml.

Created on Sep 2, 2016 1:11:41 PM by  Arne Seifert [Paessler Support]



Accepted Answer

Votes:

0

Your Vote:

Up

Down

Here's a modification of my earlier referenced Powershell script that does what you want for ping sensors: https://gist.github.com/markwragg/02a91560f46210cf67ca5c810681f6ae

It seems to work when tested against my environment, you get a CSV result of sensor details and the value of the AutoAck setting as an additional column, but you could change the script to do whatever you need with the object output.

Created on Sep 2, 2016 1:14:48 PM by  Mark Wragg (140) 1



Votes:

0

Your Vote:

Up

Down

Awesome help Mark and Arne, very much appreciated.

Created on Sep 6, 2016 12:30:13 PM by  Phil Evans (1) 1



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.