New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.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: Disabling inheritance for location does not work

Votes:

0

Your Vote:

Up

Down

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 by  dgiraud (0) 1



3 Replies

Votes:

0

Your Vote:

Up

Down

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 by  lordmilko (1,842) 2 1



Votes:

0

Your Vote:

Up

Down

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

Created on Mar 26, 2018 7:48:26 AM by  dgiraud (0) 1



Votes:

0

Your Vote:

Up

Down

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]



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.