Code: Select all
tcpdump -i ens192 -n -s0 -v port 162
tcpdump: listening on ens192, link-type EN10MB (Ethernet), capture size 262144 bytes
06:24:56.094311 IP (tos 0x0, ttl 252, id 4918, offset 0, flags [none], proto UDP (17), length 445)
10.106.255.10.55084 > 10.106.156.102.snmptrap: { SNMPv3 { F=ap } { USM B=3 T=164678676 U="nms" } { ScopedPDU [!scoped PDU]bd_62_47_fc_d6_2b_72_57_16_ea_4c_fc_a5_59_f9_41_fb_8f_dd_8b_84_c4_ca_ff_53_1e_d5_dc_f3_7c_e4_78_3b_39_1f_07_56_ce_3b_75_90_d2_2d_74_3a_82_ef_b3_b7_67_88_f3_f8_5c_26_5a_6d_65_c1_0f_57_58_b8_4f_81_16_08_58_de_70_a1_bb_ef_bf_06_e9_28_68_b4_4f_bb_c0_97_79_ea_2b_f0_8b_88_b6_39_63_ea_20_f6_c3_37_b6_86_04_4d_d4_71_cb_22_fc_68_cd_9b_10_e0_45_25_cd_44_07_fb_6b_a6_e6_bf_95_fb_fb_6f_ca_1c_3d_a3_f8_35_15_9e_72_4b_a0_22_3b_cb_39_98_1c_2f_ae_22_ba_60_de_5a_66_97_a6_4a_4e_f7_b4_3b_5b_a2_ba_9a_85_da_5d_2c_de_7c_48_77_c9_26_e9_12_de_4b_ee_09_2e_a6_6d_ae_34_a9_5a_6b_84_d4_9e_62_52_14_9a_c0_a5_20_90_a7_17_d8_10_69_dd_89_bc_1b_5a_54_41_e4_ca_8e_1a_f6_3e_b0_77_cb_12_f1_5b_97_8c_1e_de_6f_6d_dc_3b_2d_06_dd_0e_3c_7c_33_1f_a9_d7_24_11_e3_d6_e4_1c_d6_34_36_37_b7_2a_84_21_71_b0_3f_a3_a3_44_50_36_ee_6d_7b_8e_bd_cc_75_71_b4_fc_93_2f_24_3a_6a_4c_28_45_b5_cd_e4_f2_ec_af_b8_ee_fd_b4_e7_60_4b_5f_17_04_41_ea_45_96_67_44_93_29_3b_03_2a_75_84_59_23_7b_d7_0f_75_7a_a0_93_89_c8_d1_00_13_3e_d1_a1_a3_d3_8b_a4_fa_bf_96_ff_34_ed} }
06:25:00.295004 IP (tos 0x0, ttl 255, id 13423, offset 0, flags [none], proto UDP (17), length 306)Code: Select all
[root@camrn-harems-netmon-pri snmptt]# service snmptrapd status
Redirecting to /bin/systemctl status snmptrapd.service
â— snmptrapd.service - Simple Network Management Protocol (SNMP) Trap Daemon.
Loaded: loaded (/usr/lib/systemd/system/snmptrapd.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2019-09-19 06:11:18 CDT; 24min ago
Main PID: 19000 (snmptrapd)
CGroup: /system.slice/snmptrapd.service
└─19000 /usr/sbin/snmptrapd -Lsd -f
Sep 19 06:11:18 camrn-harems-netmon-pri systemd[1]: Starting Simple Network Management Protocol (SNMP) Trap Daemon....
Sep 19 06:11:18 camrn-harems-netmon-pri snmptrapd[19000]: NET-SNMP version 5.7.2
Sep 19 06:11:18 camrn-harems-netmon-pri systemd[1]: Started Simple Network Management Protocol (SNMP) Trap Daemon..
[root@camrn-harems-netmon-pri snmptt]# service snmptt status
Redirecting to /bin/systemctl status snmptt.service
â— snmptt.service - SNMP Trap Translator (SNMPTT)
Loaded: loaded (/usr/lib/systemd/system/snmptt.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2019-09-19 05:42:00 CDT; 53min ago
Process: 21290 ExecStart=/usr/sbin/snmptt --daemon (code=exited, status=0/SUCCESS)
Main PID: 21293 (snmptt)
CGroup: /system.slice/snmptt.service
├─21292 /usr/bin/perl /usr/sbin/snmptt --daemon
└─21293 /usr/bin/perl /usr/sbin/snmptt --daemon
Sep 19 05:42:00 camrn-harems-netmon-pri systemd[1]: Starting SNMP Trap Translator (SNMPTT)...
Sep 19 05:42:00 camrn-harems-netmon-pri systemd[1]: snmptt.service: Supervising process 21293 which is not our child. We'll most likely not notice when it exits.
Sep 19 05:42:00 camrn-harems-netmon-pri systemd[1]: Started SNMP Trap Translator (SNMPTT).Firewall is open for UDP/162
Code: Select all
[root@camrn-harems-netmon-pri snmptt]# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens192
sources:
services: dhcpv6-client http https ssh syslog
ports: 80/tcp 443/tcp 22/tcp 7878/tcp 162/udpsnmptt.conf has directives for traps we should be recieving:
Code: Select all
EVENT linkDown .1.3.6.1.6.3.1.1.5.3 "Status Events" Critical
FORMAT Link down on interface $1. Admin state: $2. Operational state: $3
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*" "LINK DOWN, $*"Code: Select all
traphandle default /usr/sbin/snmptthandler
#if using v3 (update user and password if required. Must match router)
createUser uernameexample SHA authpassexample AES privpassexample
authUser log,execute,net uernameexample
createUser -e 0xEXAMPLEENGINEID uernameexample SHA authpassexample AES privpassexamplehttps://support.nagios.com/kb/article.p ... ategory=55
I enabled logging but the file was not created so I touched it but nothing is showing up. Why is that happening?
I ran debug output and you can see a trap from one of the hosts (10.106.255.1) in the output (file attached). It appears not to be matching the engineID but I have confirmed that it is correct. I am also concerned about the authpriv error:
snmp_parse: Parsed SNMPv3 message (secName:nms, secLevel:authPriv): ASN.1 parse error in message
Maybe that is only showing because the engine ID is not matching.
I have had a very similar issue before:
Not receiving SNMP Traps from Nagios
Postby dfmco » Fri May 20, 2016 1:32 pm
I wound up rebuilding from scratch to correct the problem back in 2016 but since this is happening again, I don't think it is a fluke and would like to figure out why this is failing.