This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Adding nodes unsing SNMPv#3 (what am I doing wrong)?

Adding nodes using SNMPv2 has been easy since there are node properties that can be set, but when using SNMPv3 there are linked properties and I am not sure how to code this correctly.

With SNMPv2 I do this:

            SWIS.dictionary props = new SWIS.dictionary()

            {

                { new SWIS.item { key = "IpAddress", value = asset.MgmtIpAddress, type = "System.String" } },

                { new SWIS.item { key = "IPAddressGUID", value = ConvertIpToIpGuid(asset.MgmtIpAddress), type = "System.Guid" } },

                { new SWIS.item { key = "Caption", value = asset.Hostname, type = "System.String" } },

                { new SWIS.item { key = "DynamicIP", value = false, type = "System.Boolean" } },

                { new SWIS.item { key = "EngineID", value = 1, type = "System.Int32" } },

                { new SWIS.item { key = "Vendor", value = asset.Vendor, type = "System.String"} },

                { new SWIS.item { key = "PollInterval", value = 120, type = "System.Int32"} },

                { new SWIS.item { key = "StatCollection", value = 2, type = "System.Int32"} },

                { new SWIS.item { key = "Community", value = community, type = "System.String"} },

                { new SWIS.item { key = "ObjectSubType", value = "SNMP", type = "System.String"} },

                { new SWIS.item { key = "SNMPVersion", value = 2, type = "System.Int32"} },

                { new SWIS.item { key = "Status", value = 1, type = "System.Int32"} },

                { new SWIS.item { key = "UnManaged", value = false, type = "System.Boolean"} },

                { new SWIS.item { key = "Allow64BitCounters", value = true, type = "System.Boolean" } },

                { new SWIS.item { key = "SysObjectID", value = String.Empty, type = "System.String"} },

                { new SWIS.item { key = "VendorIcon", value = String.Empty, type = "System.String"} }

            };

            return Create("Orion.Nodes", props);

So for SNMPv3 I tried this:

            SWIS.dictionary snmpv3Creds = new SWIS.dictionary()

            {

                new SWIS.item { key = "AuthenticationKey", value = "asdfghjkl", type = "System.String" },

                new SWIS.item { key = "AuthenticationMethod", value = "SHA1", type = "System.String" },

                new SWIS.item { key = "Context", value = String.Empty, type = "System.String" },

                new SWIS.item { key = "PrivacyKey", value = "zxcvbnm,./", type = "System.String" },

                new SWIS.item { key = "PrivacyMethod", value = "AES128", type = "System.String" },

                new SWIS.item { key = "Username", value = "User", type = "System.String" }

            };

            SWIS.dictionary props = new SWIS.dictionary()

            {

                { new SWIS.item { key = "IpAddress", value = asset.MgmtIpAddress, type = "System.String" } },

                { new SWIS.item { key = "IPAddressGUID", value = ConvertIpToIpGuid(asset.MgmtIpAddress), type = "System.Guid" } },

                { new SWIS.item { key = "Caption", value = asset.Hostname, type = "System.String" } },

                { new SWIS.item { key = "DynamicIP", value = false, type = "System.Boolean" } },

                { new SWIS.item { key = "EngineID", value = 1, type = "System.Int32" } },

                { new SWIS.item { key = "Vendor", value = asset.Vendor, type = "System.String"} },

                { new SWIS.item { key = "PollInterval", value = 120, type = "System.Int32"} },

                { new SWIS.item { key = "StatCollection", value = 2, type = "System.Int32"} },

                { new SWIS.item { key = "ObjectSubType", value = "SNMP", type = "System.String"} },

                { new SWIS.item { key = "SNMPVersion", value = 3, type = "System.Int32"} },

                { new SWIS.item { key = "Status", value = 1, type = "System.Int32"} },

                { new SWIS.item { key = "UnManaged", value = false, type = "System.Boolean"} },

                { new SWIS.item { key = "Allow64BitCounters", value = true, type = "System.Boolean" } },

                { new SWIS.item { key = "SysObjectID", value = String.Empty, type = "System.String"} },

                { new SWIS.item { key = "VendorIcon", value = String.Empty, type = "System.String"} },

               { new SWIS.item { key = "SNMPv3Credentials", value = snmpv3Creds, type = "Orion.SNMPv3Credentials"} },

            };

            return Create("Orion.Nodes", props);

What is the correct way to add devices that use SNMP v3?

Some additional information.

As part of the process, after adding the node I add set all of our custom properties, add vendor specific pollers, and discover interfaces and add them.

  • Hi,

    Add the below provided properties to the node properties dictionary and should work. It is not required to create a separate dictionary for snmpv3credentials.

    SNMPV3AuthKey, SNMPv3AuthMethod, SNMPV3Context, SNMPv3PrivKeyIsPwd, SNMPv3PrivKey, SNMPv3PrivMethod, SNMPV3Username

  • Thank you madhaven!

    So these don't show as properties in the SDK (I am using v10) for Orion.Nodes but I know these properties do exist in the database for the nodes table.

    How did you determine the properties name? Any idea why this is not documented?