When using TAGs to list sensors in a library (for example all PING sensors), there is no way to know which sensor is from which device without hovering above it. Can the device name be displayed next to the sensor name?
Because we cannot use placeholders when renaming multiple sensors, the idea of manually adding the device name to the sensor is not an option with hundreds of sensors.
Article Comments
Hello John,
Thank you for your message.
Regarding what you would like to achieve, I recommend to use the API of PRTG to get the list of the corresponding sensors to modify, and then add the name of the device they belong to.
To get a list of sensors with a specific tag, you can use this API call:
/api/table.json?content=sensors&columns=objid,name,probe,group,device,tags&noraw=1&count=*&filter_tags=@sub(YOUR_TAG)&username=PRTGUSER&passhash=PASSHASH
Then, to modify the name of a sensor you have to use the following request:
/api/rename.htm?id=SENSORID&value=NEW_NAME&username=PRTGUSER&passhash=PASSHASH
Here is the corresponding manual: https://www.paessler.com/manuals/prtg/object_manipulation
As the device name is included with each sensor (device property), you can use a loop to define the new name in a variable that you can pass to the query above.
If you have questions, let us know.
Regards.
Apr, 2021 - Permalink
Hello John,
Thank you for your message.
Regarding what you would like to achieve, I recommend to use the API of PRTG to get the list of the corresponding sensors to modify, and then add the name of the device they belong to.
To get a list of sensors with a specific tag, you can use this API call:
Then, to modify the name of a sensor you have to use the following request:
Here is the corresponding manual: https://www.paessler.com/manuals/prtg/object_manipulation
As the device name is included with each sensor (device property), you can use a loop to define the new name in a variable that you can pass to the query above.
If you have questions, let us know.
Regards.
Apr, 2021 - Permalink