Hello, I have installed LibreNMS and am having an issue with SNMP traps at the moment. I was able to configure everything and am receiving the traps on the system and they show in the snmptrapd logs. The issue is that I cannot seem to get them to show in the individual logs for a device in LibreNMS itself. I am sure that it is something simple that I am overlooking, but I just can’t seem to find it.
LibreNMS is installed on a CentOS 8.5 server and here are the related configuration files.
/etc/snmp/snmptrapd.conf
disableAuthorization yes
authCommunity log,execute,net COMMUNITYSTRING
traphandle default /opt/librenms/snmptrap.php
/usr/lib/systemd/system/snmptrapd.service
[Unit]
Description=Simple Network Management Protocol (SNMP) Trap Daemon.
After=syslog.target network-online.target[Service]
Type=notify
Environment=OPTIONS=“-Lsd”
EnvironmentFile=-/etc/sysconfig/snmptrapd
ExecStart=/usr/sbin/snmptrapd $OPTIONS -f -m ALL -M /opt/librenms/mibs -tLf /var/log/snmptrap/traps.log
ExecReload=/bin/kill -HUP $MAINPID[Install]
WantedBy=multi-user.target
config.php
#snmptrap Event Logging
$config[‘snmptraps’][‘eventlog’] = ‘all’;
$config[‘snmptraps’][‘eventlog_detailed’] = ‘true’;
Then on the LibreNMS server, I run the following test snmptrap command:
snmptrap -v 2c -c public localhost ‘’ 1.3.6.1.4.1.8072.2.3.0.1 1.3.6.1.4.1.8072.2.3.2.1 i 123456
Then it shows the following in the snmptrapd logs /var/log/snmptrap/traps.log
NET-SNMP version 5.8
2021-12-14 09:01:48 localhost [UDP: [127.0.0.1]:59257->[127.0.0.1]:162]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (8681570) 1 day, 0:06:55.70 SNMPv2-MIB::snmpTrapOID.0 = OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate = INTEGER: 123456
But after that, it never shows in the Log for the LibreNMS device in the LibreNMS server. Thanks for your help and let me know if I can provide any other information.