New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.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


Manipulating SNMP credentials settings via API call

Votes:

0

Your Vote:

Up

Down

Hi,

Is it possible to change SNMP credentials settings in a device sensor such as community name, user name, password, SNMP version, authentication, encryption, IP address and etc. using API call?

api snmp snmp-sensor

Created on Oct 14, 2019 3:07:02 AM by  yychai97 (0) 1



3 Replies

Votes:

0

Your Vote:

Up

Down

Hi there,

Unfortunately, there is no official way to change the SNMP Credentials Parameters via the API of PRTG.

Best regards.

Created on Oct 14, 2019 8:25:15 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi yychai97,

You can do this fairly easily via PowerShell using PrtgAPI

By using the Get-ObjectProperty cmdlet you can see many of the SNMP properties that are supported

C:\> Get-Device -count 1 | Get-ObjectProperty | select *snmp*

InheritSNMPCredentials   : True
SNMPVersion              : v2c
SNMPCommunityStringV1    : public
SNMPCommunityStringV2    : public
SNMPv3AuthType           : MD5
SNMPv3UserName           :
HasSNMPv3Password        : False
SNMPv3EncryptionType     : DES
HasSNMPv3EncryptionKey   : False
SNMPv3Context            :
SNMPPort                 : 161
SNMPTimeout              : 5
InheritSNMPCompatibility : True
SNMPDelay                : 0
SNMPRetryMode            : Retry
SNMPOverflowMode         : Handle
SNMPZeroValueMode        : Ignore
SNMPCounterMode          : Use64BitIfAvailable
SNMPRequestMode          : MultiGet
SNMPPortNameTemplate     : ([port]) [ifalias]
SNMPPortNameUpdateMode   : Manual
SNMPPortIdMode           : Automatic
SNMPInterfaceStartIndex  : 0
SNMPInterfaceEndIndex    : 0

you can then modify these as desired using the Set-ObjectProperty cmdlet

Get-Device -Id 1234 | Set-ObjectProperty -SNMPCommunityStringV2 test -SNMPPort 162

Regards,

lordmilko

Created on Oct 14, 2019 8:53:26 AM by  lordmilko (1,842) 2 1



Votes:

0

Your Vote:

Up

Down

Hi lordmilko,

Thank you for your suggestion.

That might add complexity to my Python script.

I tried PrtgApi before and it is difficult for me to use it.

Somehow I figure it out later.

Thank you

Created on Oct 15, 2019 1:40:06 AM by  yychai97 (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.