Is there a way to get a list of all sensors for a device with the sensor's ID listed, too? If Channel numbers and names were listed as well it would be great, but not critical.
List of Devices/Sensors with respective IDs listed
Votes:
0
15 Replies
Votes:
1
Hello,
you could do this with the PRTG API, and for example the following call:
/api/table.xml?content=sensors&output=xml&columns=objid,device,sensor,status&id=13337
You would receive an XML-Output list with all sensors from the device with the ID 13337. Please go to Setup|PRTG API to review all options. Please also be sure to use the Query Builder there on the tab Live Data.
Best Regards
Votes:
0
Please where is PRTG API. How do I run the command:
/api/table.xml?content=devices&output=csvtable&columns=device,host
Thanks,
Alfred
Votes:
0
hallo,
which exact PRTG version are you using? In PRTG 12 in the web interface you need to go to Setup in the menu bar and there you can select PRTG-API
Votes:
0
I am using PRTG Network Monitor 9.1.5.1900
Thanks,
Alfred
Votes:
0
in version 9 look at the help section of PRTG. There should be a small question mark at the right top of the web interface. Click on it and you should be able to go from there.
Votes:
0
We upgraded to version 12 but there's no PRTG-API under setup. Setup has overview, apps for phones, etc...just 3 items under it. How else can I get to the API to launch commands.
Thanks
Votes:
0
Hi,
to access the API documentation, just append /api.htm to the URL of your PRTG installation, e.g. http://yourprtginstallation/api.htm .
Best regards
Votes:
0
Thanks for this information. I still don't see how I can run API commands from PRTG but I now know how I can get a list of the device name from the web address. Here's a little issue.
The device name entries in my PRTG look like this:
Name of Device xxx:1234 (123.456.789.899)
some look like this:
Name of Device xxx:1234 (123.456.789.899)
where (123.456.789.899) is the IP address of that device.
When I ran the command: http://myprtg/api/table.txt?content=sensors&output=xml&columns=device&username=myusername&passhash=myhash
It returned all my device names.
Name of Device xxx:1234
However the IP address part was not listed.
How can I have the command to also list the IP address with the device names.
Thanks,
Alfred
Votes:
0
Hi,
as PRTG only contains a HTML API the documentation is all what is needed. All API Calls against PRTG are made through URLs.
To get a IP address associated to the device you may add the "host" parameter to your API call wich will cause PRTG to show either the IP address (if known) or the hostname.
An example would be
http://myprtg/api/table.txt?content=sensors&output=xml&columns=device,host&username=myusername&passhash=myhash
Votes:
0
I tried your suggestion, It gets the device name but it did not get the IP address in front of it. We put the IP address in from of the device name. example:
ABC company Dallas Tx Cisco:4200 (72.99.11.222) some look like this: ABC company Dallas Tx Cisco:4200 (72.99.11.222)
When I ran the command, I only got: ABC company Dallas Tx Cisco:4200
How can have the command grab the entire line or lines?
Thanks,
Alfred
Votes:
0
One note: You must be administrator user in PRTG to be able to see the API section in the Help Menu.
Votes:
0
Thanks for that information. Any answer to my previous question:
I tried your suggestion, It gets the device name but it did not get the IP address in front of it. We put the IP address in from of the device name. example: ABC company Dallas Tx Cisco:4200 (72.99.11.222) some look like this: ABC company Dallas Tx Cisco:4200 (72.99.11.222) When I ran the command, I only got: ABC company Dallas Tx Cisco:4200 How can have the command grab the entire line or lines, IP address included.
Best Regards,
Alfred
Votes:
0
I am runing the API: /api/table.xml?content=sensors&output=xml&columns=objid,device,sensor,status&id=2015, but I dont recieve the IP adress information.
The answer is:
14.4.12.3510 2018 LaptopLuis2 PING 5 Up 3
How i can get the device IP adress.
Thanks in advance.
Votes:
0
Sorry, it is not possible to get the IP/Hostname of a device on a table-sensors call.
Add comment