What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

List of Devices/Sensors with OID

Votes:

0

Is there a way to get a list of all sensors and their OIDs (when they have them)? I am using API: /api/table.xml?content=sensors&output=xml&columns=objid,probe,group,device,sensor,status,tags.... but I do not find a field with the OID info when the object has a snmpcustomsensor

Thanks in advance

api devices export oid prtg sensor snmp sutom

Created on May 22, 2018 11:41:41 PM



1 Reply

Accepted Answer

Votes:

1

The OIDs of SNMP Custom sensors are not exposed via the /api/table.xml endpoint. These values are likely only accessible by parsing the contents of the sensor's Settings page. You can easily extract this information however using PrtgAPI

C:\> flt type eq snmpcustom | Get-Sensor | Get-ObjectProperty -Raw

name               : CPU Load
parenttags         : 
tags               : ciscoswitch cpuloadsensor
oid                : 1.3.6.1.4.1.9.9.109.1.1.1.1.5.1
channel            : CPU Load
unit               : %
factorm            : 1
factord            : 1
...

If you wish to prepare a report containing OIDs from all sensor types (not just snmpcustom) you can simply do

C:\> Get-Sensor | Get-ObjectProperty -Raw | select name,oid | Export-Csv C:\oidreport.csv -NoType

However note that other SNMP sensor types may name their raw "oid" field something slightly different

Regards,

lordmilko

Created on May 23, 2018 5:35:54 AM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.