Article Comments

Hello,

Thank you for the KB-Post. The filter to only get sensors from a certain group should be

?id=

replace the ? with & should it not be the first parameter.

best regards.


Nov, 2017 - Permalink

Hi Torsten!

That does work for what you describe however im not looking to filter output, simply have a column in my xml/csv that has the parent group ID or better still a group name.

To give you some background i am using the above url to output a file of current alarms, it gives me the following columns

Down for Probe Group Device Sensor Last Value Status Message Priority ID URL

as well as the above RAW output with a column each. I need one of these columns to be the Group ID or group name as we use the grouping system for each of our customers


Nov, 2017 - Permalink

Oooh hold on i am making headway, i have now added the group to the columns list with "columns=group%2C" however this just gives the immediately previous group. This doesnt work for a few customers we have who are nested thusly

Devices>Customer Name>Servers>Device Devices>Customer Name>Network>Device

etc

What can i add to columns= to show the parent groups?

Many thanks Samuel


Nov, 2017 - Permalink

Hi Sam, I need to explain the details here. As you are pulling a list of sensors, you are also pulling their properties (as columns of the table). And sensors only know their immediate parent group (and their parent Probe of course). They do not know any nested groups in between, and there is no recursing through the tree as it would greatly impact the performance of such an API call to get the nested groups.
The only way I see would be a 2nd API call that gets a list of all groups within PRTG and then scripted combine the two lists (which isn't going to be easy) I'm afraid.

best regards.


Nov, 2017 - Permalink

The identity of the parent probe may be useable as we have a defined list of probe devices and associated customers within our CRM. Things that aren't easy are my forte :P I figured i'd need to create some kind of lookup during this anyhow. I will work on getting the group listings (any tips appreicated) and merging them together.

Sadly there is no way around this as knowing which of our customers generate the most alerts is a somewhat important KPI to our management :l


Nov, 2017 - Permalink

With

columns=probe,group,device

you should get all the possible parent elements (except the groups between the direct parent group and the probe of course).


Nov, 2017 - Permalink

Perfect!! The probe column is exactly what i need. Thanks so much :)


Nov, 2017 - Permalink