Hi guys,
I would like to include in a map some information about PRTG installation, like numbers of sensor used and the number of daily scans. Is there a way to do it?
Thank you
Article Comments
Hi Felix,
Today playing around with powershell I found an alternative solution.
$html=Invoke-WebRequest -Method Get -Uri 'https://prtgserver/welcome.htm?&username=user&passhash=hash'
($html.ParsedHtml.body.getElementsByClassName('scansum'))[0].innertext
et-voilà
what do you think? Let me know.
Dec, 2017 - Permalink
Hi there,
Unfortunately, most scripts won't work with the extensive HTML-Parsing of PowerShell as this needs a configured Internet Explorer, but the PRTG Server runs the sensors within the SYSTEM-Context where the IE is usually not configured. That's why "-UseBasicParsing" should be used in a PowerShell script, but that makes your snippet useless. :/
Best regards.
Dec, 2017 - Permalink
Hey Vogs7,
There is a sensors from a third party developer which lists the number of sensors in a certain state. Please note that the sensor comes as is and that we cannot provide support for it. You could install this sensor to set limits if the total number of sensors with a different state gets exceeded. Here is a guide how to integrate this sensor:
Enter the IP address:port and the user credentials of one PRTG user
Getting status values like the daily scans is not possible via the API at the moment, I'm afraid.
Best regards, Felix
Nov, 2017 - Permalink