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)


Article Comments

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

Regards,

lordmilko


Oct, 2022 - Permalink

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).


Oct, 2022 - Permalink