New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


PRTG API - Get all sensors and their config values ?

Votes:

0

Your Vote:

Up

Down

I would like to export all snmp sensors with their snmp config values aka snmp version, community ... Can PRTG API help ?

api configuration snmp

Created on Feb 28, 2019 10:19:04 AM by  Lubomir Cerny (0) 1



Best Answer

Accepted Answer

Votes:

1

Your Vote:

Up

Down

Hi Lubomir,

You can easily do this with PrtgAPI

The SNMP settings you've specified are typically defined on devices; you can view all SNMP properties of a device using the Get-ObjectProperty cmdlet

C:\> Get-Device -Id 1001 | Get-ObjectProperty | select *snmp*

InheritSNMPCredentials   : False
SNMPVersion              : v3
SNMPCommunityStringV1    : public
SNMPCommunityStringV2    : public
SNMPv3AuthType           : SHA
SNMPv3UserName           : SNMP_v3
HasSNMPv3Password        : True
SNMPv3EncryptionType     : AES
HasSNMPv3EncryptionKey   : True
...

As PrtgAPI doesn't contain intimate knowledge of all sensor types, if you want to get the SNMP specific settings of a sensor (such as its OID), you can retrieve this information by specifying Get-ObjectProperty -Raw

Regards,

lordmilko

Created on Mar 1, 2019 10:36:56 AM by  lordmilko (1,182) 2 1



3 Replies

Votes:

0

Your Vote:

Up

Down

Hello Lubomir,

Thank you very much for your contact.

The PRTG API won't provide you with the requested information, because information such as the SNMP version, community string etc. are stored within the "Settings" tab of a device or inherited by an parent object such as a Group or Probe.

You can try how far you come by exporting a hierarchical list of all groups, devices and sensors using the following API call: /api/table.xml?content=sensortree Afterwards, export the object IDs of your probes, groups and devices and use them to create configuration reports applying the IDs in the URL: https:/your-prtg-server/config_report_object.htm?id=%id_of_the_object% Please note that the community string will be obliterated.

Best regards,
Sebastian

Created on Mar 1, 2019 6:56:37 AM by  Sebastian Kniege [Paessler Support]



Accepted Answer

Votes:

1

Your Vote:

Up

Down

Hi Lubomir,

You can easily do this with PrtgAPI

The SNMP settings you've specified are typically defined on devices; you can view all SNMP properties of a device using the Get-ObjectProperty cmdlet

C:\> Get-Device -Id 1001 | Get-ObjectProperty | select *snmp*

InheritSNMPCredentials   : False
SNMPVersion              : v3
SNMPCommunityStringV1    : public
SNMPCommunityStringV2    : public
SNMPv3AuthType           : SHA
SNMPv3UserName           : SNMP_v3
HasSNMPv3Password        : True
SNMPv3EncryptionType     : AES
HasSNMPv3EncryptionKey   : True
...

As PrtgAPI doesn't contain intimate knowledge of all sensor types, if you want to get the SNMP specific settings of a sensor (such as its OID), you can retrieve this information by specifying Get-ObjectProperty -Raw

Regards,

lordmilko

Created on Mar 1, 2019 10:36:56 AM by  lordmilko (1,182) 2 1



Votes:

0

Your Vote:

Up

Down

Hi lordmilko. Great !

I already made PrtgAPI ready on our system and tried some exports via this great powershell module. The point was the correct syntax :-)

Have a nice day.

Created on Mar 1, 2019 11:46:14 AM by  Lubomir Cerny (0) 1



Please log in or register to enter your reply.


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.