I am setting up OpenNMS on an Ubuntu server to listen to a stream of SNMP traps from an external EMS and ran into an issue. I can successfully receive traps I am sending from the server where OpenNMS is installed, however OpenNMS doesn’t see any traps coming from outside.
At first it seemed like a firewall issue, but I can see the incoming traps via Wireshark on OpenNMS server, so the packets are not dropped. I’ve enabled debug-level logging for trapd and the log doesn’t show any activity when I see a new trap from EMS appear in Wireshark. The traps I am sending manually are properly logged in trapd log and shown in OpenNMS dashboards.
Either I am missing some piece of configuration, or there is a deeper firewall/OS issue at work here. Just case, here is the trapd-configuration.xml and snmp-config.xml I am currently using.
<trapd-configuration xmlns="http://xmlns.opennms.org/xsd/config/trapd" snmp-trap-address="*" snmp-trap-port="162" new-suspect-on-trap="true" include-raw-message="false" threads="0" queue-size="10000" batch-size="1000" batch-interval="500" java.net.preferIPv4Stack="true">
<snmpv3-user security-name="ems-username" security-level="1" engine-id="800000a10352540001e90a"/>
</trapd-configuration>
Some comments on trapd config - the EMS uses SNMPv3 noAuth mode, hence security-level=1; java.net.preferIPv4Stack="true" was added as I found it as a potential solution in another thread, but presence/absence of this parameter does not seem to impact the situation.
<snmp-config xmlns="http://xmlns.opennms.org/xsd/config/snmp" security-name="ems-username" version="v3" read-community="public" timeout="1800" retry="1" port="162">
<definition write-community="private" port="161">
<specific>[EMS ip]</specific>
</definition>
</snmp-config>
Would appreciate any leads on how this issue can be solved.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…