Adison Rivera
2013-09-27 04:30:07 UTC
Hi everyone,
I'd like to ask for some insights into a couple of issues I'm facing in using Net-Snmp to monitor an SnmpV3 device as I'm really quite new with Net-Snmp.
Here are the pertinent information:
Version of Net-Snmp: 5.7.2
Protocol Version used: SnmpV3
Issue 1:
I'm encountering an issue where a call to snmp_synch_response( ) just hangs even if I set the timeout to around 5 seconds.
I'm monitoring an snmpv3 device every X number of minutes.
I'm able to successfully query the device for about 5-10 cycles but then suddenly it would just hang in the snmp_synch_response( ) function call.
I don't encounter this issue with SnmpV1/SnmpV2.
Issue 2:
If I restart the target device, then timeout happens and my program is not able to recover. It will just keep timing out even if the target device has successfully restarted.
For every query that I do, I always create a new session, call session_open, create the request pdu, set the security parameters, then send the request using snmp_synch_response().
I am thinking that this issue is regarding snmpEngineBoots and snmpEngineTime mismatch between my application and the target device after the last boot.
Right now, as a workaround, I call shutdown_secmod(); to clear the security cache and that seems to make my application communicate again with the device. I feel that this is not the right solution at all.
I also don't encounter this issue with SnmpV1/V2
I've followed the examples on the tutorial section but the examples don't cover other exception cases (like how to handle if device is rebooted, or network communication is lost, etc).
Any help is very much appreciated!
Thanks a lot!
Best regards,
Adison Rivera
I'd like to ask for some insights into a couple of issues I'm facing in using Net-Snmp to monitor an SnmpV3 device as I'm really quite new with Net-Snmp.
Here are the pertinent information:
Version of Net-Snmp: 5.7.2
Protocol Version used: SnmpV3
Issue 1:
I'm encountering an issue where a call to snmp_synch_response( ) just hangs even if I set the timeout to around 5 seconds.
I'm monitoring an snmpv3 device every X number of minutes.
I'm able to successfully query the device for about 5-10 cycles but then suddenly it would just hang in the snmp_synch_response( ) function call.
I don't encounter this issue with SnmpV1/SnmpV2.
Issue 2:
If I restart the target device, then timeout happens and my program is not able to recover. It will just keep timing out even if the target device has successfully restarted.
For every query that I do, I always create a new session, call session_open, create the request pdu, set the security parameters, then send the request using snmp_synch_response().
I am thinking that this issue is regarding snmpEngineBoots and snmpEngineTime mismatch between my application and the target device after the last boot.
Right now, as a workaround, I call shutdown_secmod(); to clear the security cache and that seems to make my application communicate again with the device. I feel that this is not the right solution at all.
I also don't encounter this issue with SnmpV1/V2
I've followed the examples on the tutorial section but the examples don't cover other exception cases (like how to handle if device is rebooted, or network communication is lost, etc).
Any help is very much appreciated!
Thanks a lot!
Best regards,
Adison Rivera