Is there anyway to see (and edit) where any comments are filled out for devices/sensors? I know I can go into each and every device and sensor, but am looking for an easier way.
How do I obtain a list of device/sensor comments?
Votes:
0
Best Answer
Votes:
0
Well, you could use the API to generate a list off all sensors with their comments.
http://yourserver/api/table.xml?content=sensors&columns=objid,comments&login=[user]&password=[password]
This will generate something like:
- <item> <objid>1001</objid> <comments>This is a comment</comments> </item> - <item> <objid>1002</objid> </item> - <item> <objid>1003</objid> </item>
Next, loop through the <comments> tags, find its <objid> sibbeling and open the corresponding webpage:
http://yourserver/sensor.htm?id=1001&gototab=12
13 Replies
Votes:
0
Hello,
I'm afraid Multi-Edit for comments is not possible/available.
Best Regards.
Votes:
0
Even if there was a way to just list out all the comments, that would be a help.
It seems that some sensors automatically populate at discovery time with results from SNMP or WMI, like model and serial#. However, without going into each device/sensor, it is unknown whether a device/sensor has comments.
We're starting to use the comments field as a note about where a server/device is, leaving the geomap locate to the respective probe location.
Votes:
0
Well, you could use the API to generate a list off all sensors with their comments.
http://yourserver/api/table.xml?content=sensors&columns=objid,comments&login=[user]&password=[password]
This will generate something like:
- <item> <objid>1001</objid> <comments>This is a comment</comments> </item> - <item> <objid>1002</objid> </item> - <item> <objid>1003</objid> </item>
Next, loop through the <comments> tags, find its <objid> sibbeling and open the corresponding webpage:
http://yourserver/sensor.htm?id=1001&gototab=12
Votes:
0
Thanks Gerard, that looks like what I need to get a list. Will give that a try now.
Votes:
0
I tried the api, even tried it while on the demo site's help page where you can interactively build the url for the api. Neither seemed to spit out comments, no matter the format (html, xml, or csv). It's like the api is ignoring the comments field identifier.
Votes:
0
8.1.0.1628. When I use the API to build an xml with other fields, it works fine. Just not comments, which I confirmed is a valid column name from the API help from the demo site.
Votes:
0
I can confirm that it actually works on version 8.1.0.1628
<?xml version="1.0" encoding="UTF-8" ?> - <sensors> <prtg-version>8.1.0.1628</prtg-version> - <item> <objid>1001</objid> <comments>Comment on sensor 1001</comments> </item> - <item> <objid>1002</objid> </item>
Note: if comments are empty, there is no <comments> section for that sensor !
Votes:
0
Yes, Gerard is right. It should work with version 8.x
Votes:
0
I even upgraded the other day to 8.1.0.1670 and it still doesn't show in the XML.
Here is the API syntax I used. I was already signed in the browser, so I did not need the username/password portion. I get every column but the comments.
/api/table.xml?content=sensors&output=xml&columns=objid,probe,group,device,sensor,host,comments
Created on Oct 14, 2010 4:30:47 PM
Last change on Oct 15, 2010 7:49:11 AM by
Daniel Zobel [Product Manager]
Votes:
0
Copied and pasted the url and tested it on my own PRTG server without any problem.
This might sound silly, but are you sure that your comments are entered in the comments tab (multi line text box) of the device and not by mistake in the "tag" field (single line text box)
Votes:
0
Ah, I see what it is doing. All the comments I have manually found have been at the device setting. These must come from WMI or SNMP. I don't have any comments entered at the sensor level, so the comments don't appear in the XML. Once I entered a comment at the sensor level, I saw some in the XML output.
So, I switched the API call to "content=devices" and I now see comments I have put in at that level, as well as the ones from SNMP or WMI.
Thanks for your help guys!
Created on Oct 15, 2010 2:51:06 PM
Last change on Oct 15, 2010 3:31:05 PM by
Torsten Lindner [Paessler Support]
Votes:
0
> I'm afraid Multi-Edit for comments is not possible/available.
I would like to use the API to write comments.
What is multi-edit? Is it possible to write comments using the API?
Add comment