I am trying to generate a report of information from PRTG using the API and some of the values I would like to retrieve are on the System Information tab for a device. Does anyone know how I can retrieve this information in the API.

Preferably I would like to be able to add this as a column to my existing query.


Article Comments

H sikotic,

System Information can technically be retrieved via the API, however the data that is returned is technically not "JSON" (it is an abomination masquerading as JSON :P) so requires significant manipulations in order to convert into something a normal JSON parser will accept. The following illustrates how you would retrieve the "system" System Information category from PRTG

http://prtg.example.com/api/table.json?id=40&content=sysinfo&columns=_key,_value,_id,_adapter,_receivetime,_displayname&catego
ry=system&username=prtgadmin&passhash=12345678

System Information can also be retrieved a lot easier using PrtgAPI, which handles all of the required manipulations for you

C:\> Get-SystemInfo -Id 1001 Hardware

Name                       DeviceId   Class            State   Capacity   SerialNumber
----                       --------   -----            -----   --------   ------------
\\.\PHYSICALDRIVE0         1001       DiskDrive        OK
Intel(R) Xeon(R) CPU X...  1001       Processor        OK                 Intel64 Fami...
Microsoft ISATAP Adapter   1001       NetworkAdapter
Microsoft Kernel Debug...  1001       NetworkAdapter
Microsoft Print to PDF     1001       Printer          Unknown
...

For more information please see the PrtgAPI Wiki

Regards,

lordmilko


Dec, 2020 - Permalink

Thank you. This is excellent info, I'll start playing around.


Dec, 2020 - Permalink