How to model a device configured for SNMPv3 using Spectrum Web Services
search cancel

How to model a device configured for SNMPv3 using Spectrum Web Services

book

Article ID: 15575

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

We have a question about V3 modeling through Spectrum Web Service API. For adding v1 and v2 models, we can use the "community string =" statement as part of the post. How does that work for v3?

Environment

Release: Any
Component: Discovery and Modeling

Resolution

When using the Spectrum Web Service API to model SNMPv3 devices, use the following format to specify the SNMPv3 community string for the "community string =" parameter:

#v3/P:myAuthPW:myPrivPW/myUserID 

The following is an example for default MD5 and DES:

http://spectrum:8080/spectrum/restful/model?landscapeid=0x100000&ipaddress=1.1.1.1&commstring=#v3/P:myAuthPW:myPrivPW/myUserID

NOTE: The default authentication and privacy algorithm are set in the $SPECROOT/SS/.vnmrc file:

snmpv3_default_auth_protocol=md5
snmpv3_default_priv_protocol=des

 

The following is an example for SHA and AES:

http://<OneClick_host>:<port>/spectrum/restful/model?landscapeid=0x100000&ipaddress=1.1.1.1&commstring=#v3/P:SHA^test:AES^test/test

You will have to encode the commstring value.

Go to any Site to encode a URL, example: https://meyerweb.com/eric/tools/dencoder/

Paste the commstring value.

#v3/P:SHA^test:AES^test/test

Click on Encode button.

Replace the commstring value with the encoded output:

http://<OneClick_host>:<port>/spectrum/restful/model?landscapeid=0x100000&ipaddress=1.1.1.1&commstring=%23v3%2FP%3ASHA%5Etest%3AAES%5Etest%2Ftest

Additional Information

Note: For SNMPv3 profiles when there are special characters in the credentials (e.g. Pass/Word123) you need to replace the special characters with the encoded values. e.g. 

For a commstring of #v3/P:SHA^Pass/Word123:AES^Pass/Word123//spectrum_lab_slash you need to use #v3/P:SHA^Pass&#47;Word123:AES^Pass&#47;Word123//spectrum_lab_slash

where &#47; is encoded value for / 

ASCII Encodings for special characters can be found here:

Please reference the "Manually Model an SNMPv3 Device" section of the documentation for more information.