DX NetOps

 View Only
  • 1.  Restful API/automated adding SNMPV3 Devices

    Posted May 19, 2017 03:28 PM

    We have SNMP v3 profiles in the Discovery Console.  I would like to be able to add V3 devices through the restful API.  Or, if that won't work, by scripting vnmsh commands.  In doc or this communities site, I have not seen mention of that ability.  

    Has anyone successfully added SNMP v3 devices to Spectrum via code and outside of the GUI console?



  • 2.  Re: Restful API/automated adding SNMPV3 Devices

    Posted May 21, 2017 05:37 PM

    Hi,

    the SNMPv3-Credentials are stored int he same attribute like the SNMPv1 or v2c-credentials.

    Have You tried to add a SNMPv3- device the same way like SNMPv1/2c-Devices could be added? I would say that this works the same way and the profiles are ignored in this case.

    Take a SNMPv3-Device, open the attributeEditor and You have to search for the Communty-Attribute.

    Take that Attribute to create new Devices.

    That should work.

     

    Best Regards

    Erich



  • 3.  Re: Restful API/automated adding SNMPV3 Devices
    Best Answer

    Broadcom Employee
    Posted May 22, 2017 01:57 PM

    Yes, it works with v3.  If you are using sha and aes you need to pass the v3 comm string through a url decoder.

     

    Here's an example of using the default MD5 and DES:


    http://OChost:port/spectrum/restful/model?landscapeid=<landscapehandle>&ipaddress=<ip_address>&attr=0x1006e&val=<hostname>&agentport=161&commstring=#v3/P:specauth:specpriv/specuser&parentmh=<Universe_model_handle>&retry=3&timeout=3000

     

    Here's an example of using SHA and AES:


    http://OChost:port/spectrum/restful/model?landscapeid=<landscapehandle>&ipaddress=<ip_address>&attr=0x1006e&val=<hostname>&agentport=161&commstring=%23v3%2FP%3ASHA%specauth%3AAES%specpriv%2specuser&parentmh=<Universe_model_handle>&retry=3&timeout=3000