Hi Frank,
Regarding to ‘snmpInPkts’ in SNMPv2-MIB ‘snmp’ group, I didn’t find the implementation in snmp4j-agent.
While ‘snmpInBadCommunityNames’ and others are implemented with ‘fireIncrementCounter’.
Would you please help to indicate, how could I implement the ‘snmpInPkts’?
Now its value is always 0.
Also, we want to set ‘snmpEnableAuthenTraps’ to ‘2’. How could I achieve this?
Thanks a lot.
For the first (get snmpInPkts counter events reflected in the SNMPv2-MIB), you can call
dispatcher.addCounterListener(agentConfigManager.getSNMPv2MIB());
To change the snmpEnableAuthenTraps.0 instance to 2, simply execute a SNMP SET operation for 1.3.6.1.2.1.11.30.0
and set to to Integer32
=2.
Thanks Frank.
The counterListener has been added to agent in ‘AgentConfigManager’.
protected void linkCounterListener() {
agent.removeCounterListener(snmpv2MIB);
agent.addCounterListener(snmpv2MIB);
But no ‘fireIncrementCounter’ is executed for ‘snmpInPkts’, so its value is always 0.
Please read my code carefully, agent != dispatcher!
Great, it works.
Thanks Frank.