Id like to be able to use the PRTG API to create an export of all of the duplicate entries in my environment. Over the years MANY devices have been double imported creating double the amount of sensors required. Like to perform a little clean up is there anyway to pull all duplicate devices in my PRTG environment using the API?


Article Comments

This would work:
http(s)://your.prtg.server/api/table.xml?content=devices&output=xml&columns=objid,probe,group,device,host,baselink

This will give you an XML file you can open in Excel, containing all devices and their IP or hostname as configured in PRTG. This way you can at least identify easily redundant IPs and hostnames. What it does not do since Excel has no formula to do this out of the box is to lookup which hostname would match which IP.

One more thing: The API call is limited to deliver max. 500 items, so in case you have 600 devices for example, add a count parameter to the API call like this: http(s)://your.prtg.server/api/table.xml?content=devices&output=xml&columns=objid,probe,group,device,host,baselink&count=600

Kind regards.


Apr, 2017 - Permalink