Reply

Retrieve SNMP status through API

Authority
Posts: 40
2264     0

Hi Experts,

I am trying to solve a problem with config collection on our network. We have disabled snmp on some devices due to some vulnerabilities and I am looking for a way to manually collect running-config on these devices because netmri polling is disabled.

 

I am planning to use an API which can give me the snmp status of a device.Specifically I am looking for "snmp status disabled". I do not want to touch devices on which snmp credentials failed or snmp-not-enabled etc.

If snmp is disabled, then a script would manually collect running-config and dump it in a directory. Can you tell me which API, I can use for this? Would this work?  $remote->SystemInd under NetMRI :: API :: Remote :: V2_10_0 :: DataCollectionStatus ???

 

Capture.JPG

 

 

 

Re: Retrieve SNMP status through API

Adviser
Posts: 353
2265     0

The best place to get this is the DeviceSNMPPollingInd field of the DeviceSetting object:

 

https://netmri/api/3/device_settings

 

Try one thing before this though - once a device has been successfully discovered and you have gotten configs, and you have then disabled SNMP. Then, try manually forcing a config collection via the get_configs call in the config_revisions API:

 

https://netmri/api/3/config_revisions/docs#get_configs

 

I am not sure, but it may allow you to do that even with SNMP disabled.

 

John

 

Showing results for 
Search instead for 
Do you mean 

Recommended for You