So, I can "add" nodes as icmp, snmpv2 and v3 (if I hardcode the id/passwords for it). I can auto-discover a node with single IP and shows up as ICMP. But for the absolutely life of me - including using the python snmpv3 code (linked below) I can't get it. It adds it, but doesn't 'discover' it as snmpv3.
Python example I started with for snmpv3: orionsdk-python/samples/discover_one_node.py at master · solarwinds/orionsdk-python
npm_server = "aMadeUpServer" #DEV
username = aMadeUpUser
password = aMadeUpPassword
target_node_ip = 'the ip address here but removed for psot'
credential_id = 17 ### this is the ID from a sql query of id's and names that is the cred we want for the snmpv3
orion_engine_id = 1
swis = SwisClient(npm_server, username, password)
print("Add an SNMP v3 node:")
corePluginContext = {
'BulkList': [{'Address': target_node_ip}],
'Credentials': [
{
'CredentialID': credential_id,
'Order': 1
}
],
'WmiRetriesCount': 0,
'WmiRetryIntervalMiliseconds': 1000
}
corePluginConfig = swis.invoke('Orion.Discovery', 'CreateCorePluginConfiguration', corePluginContext)
discoveryProfile = {
'Name': 'discover_one_node.py',
'EngineID': orion_engine_id,
'ObjectSubType': 'SNMP',
'SNMPVersion': 3,
'SNMPV3Username': 'the name that matches the previous queried ID here',
'SNMPV3PrivMethod': 'AES128', # Set the desired privacy method
'SNMPV3PrivKeyIsPwd': True, # Indicate if the private key is a password
'SNMPV3PrivKey': 'theKeyfortheaboveCred', # Provide the private password
'SNMPV3AuthMethod': 'SHA1', # Set the authentication method
'SNMPV3AuthKeyIsPwd': True, # Indicate if the authentication key is a password
'SNMPV3AuthKey': 'theKeyfortheaboveCred', # Provide the authentication password
'DNS': '',
'SysName': 'aMadeUpSysName',
'Caption': 'somecaption'
'JobTimeoutSeconds': 3600,
'SearchTimeoutMiliseconds': 5000,
'SnmpTimeoutMiliseconds': 5000,
'SnmpRetries': 2,
'RepeatIntervalMiliseconds': 1800,
'SnmpPort': 161,
'HopCount': 0,
'PreferredSnmpVersion': 'SNMP3',
'DisableIcmp': False,
'AllowDuplicateNodes': False,
'IsAutoImport': True,
'IsHidden': True,
'PluginConfigurations': [{'PluginConfigurationItem': corePluginConfig}]
}
print("Running discovery...")
result = swis.invoke('Orion.Discovery', 'StartDiscovery', discoveryProfile)
print("Returned discovery profile id {}".format(result))