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

API: Disabling inheritance for location does not work



Hello We plan to batch populate many sites from Group Templates

I am using Powershell to clone a template in which the location is inherited from above then I go through every cloned object to set several properties

In the top cloned group I set the location: Set-PRTGDeviceAttribute $NewGroup.Id location $StringAddressWithSeveralLines The function calls /api/setobjectproperty.htm?id=$deviceID&name=$attribute&value=$value$authenticate

This works (i.e. the address is present in the location field)

Then I disable inheritance Set-PRTGDeviceAttribute $NewGroup.Id location_ 0 It calls the same function: /api/setobjectproperty.htm?id=$deviceID&name=$attribute&value=$value$authenticate

name is location_ and value is 0 (according to the documentation)

This does not work

I tried to disable inheritance first then set the address, tried to use 1 instead 0 after disabling inheritance from the GUI

Nothing works Could you please help?

I have thought of a last option: disable inheritance with an empty address in the template but this would be a bad option as the template may be used for other usages, where inheritance must be enabled

Thank you upfront

api inheritance location

Created on Mar 23, 2018 10:41:12 AM

3 Replies



Location inheritance is controlled via the locationgroup property

$id = 1001

Invoke-WebRequest http://prtg.example.com/editsettings?id=$id&locationgroup=0&username=prtgadmin&passhash=12345678

Regards, lordmilko

Created on Mar 26, 2018 7:18:07 AM



Thank you locationgroup was not in the api doc of our server

Created on Mar 26, 2018 7:48:26 AM



Thanks, @lordmilko! Much appreciated! :)

Kind regards,
Stephan Linke, Tech Support Team

Created on Mar 26, 2018 8:00:31 AM by  Stephan Linke [Paessler Support]

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.