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

Infrastructure as Code/DSC



Is it possible to configure prtg(or parts of it) over a configuration file?

We want to monitore many sites over prtg and we need to enter TONS of addresses.

The sensors are pretty simple most of them are ping,snmp or bandwidth sensors.

I played a bit with the powershell module from lordmilko, but the "Infrasturcture as Code" feature is currently in development. I could write a script with the existing commandlets, but it would litterly be a "IaS wrapper".

I know I can create a template for a site and clone this template, but there are to many addresses to enter.

I would take every option(scripting language or tool etc.) to not press billion times the same buttons for weeks.

(Scriptrunner is unfortunately not an option)

api automation dsc ias powershell

Created on Oct 14, 2022 7:41:07 AM

2 Replies



There is a blog article I wrote that describes how you can use PrtgAPI to create complex trees using a CSV file. This blog post about adding notification triggers is actually a stripped down version of a script that also tries to add these missing sensors if they don't exist.

The tricky part of any Infrastructure as Code solution implemented in PrtgAPI is most sensor types will require the use of Dynamic Sensor Parameters, which may need certain values to plugged into them and also add a performance challenge, but it can be done



Created on Oct 14, 2022 9:30:41 PM



Thanks for your reply, i already wrote a script that creates many sites based on a csv file (groups/devices/sensors) and it works as intended. I wrote all the if statements a IaS/DSC solution would do.(checks if it exists, if not, create it ...).

If I now want to change the structure of a site I need to check for dependencies. The script will be grow over time to manage all this dependencies and I probably need to migrate some sites between probes(cause of performance). But I think I dont have to say it, cause you already saw the need of a IaS feature and wrote about it in the Instructions :).

I'm just surprised that there is no solution (yet).

Created on Oct 17, 2022 9:13:33 AM

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.