Example snmptrapd
Configuration for Testing Purposes
The following suggestions are intended to be useful for reasonably skilled system administrators willing to read and understand a manual page as well as willing to spend a bit of time experimenting and learning. If more directed help is needed, ask the experts (TM).
We assume a management system ingesting SNMP INFORMs is already in place. It would not be Bacula specific anyway.
Install all possibly needed MIBs on the designated snmp receiver host as outlined above.
Create an
snmptrapd
user. Manual pages are useful, snmp understanding is as well. In short: Put appropriate createuser lines into/var/lib/snmp/snmptrapd.conf
and (re) startsnmptrapd
. The lines will be converted to local, engine-specific auth lines.createuser informsubmit SHA informpass AES
is what was used for the default config file we provide.For easier readability, starting
snmptrapd
with all MIBs loaded may be useful. For that purpose, editing the systemd unit file is probably the simplest approach. Thus:systemctl show snmptrapd.service | grep ExecStart
to find the actual program call, and
systemctl edit snmptrapd.service
to add the needed
-m ALL
option:[Service] ExecStart= ExecStart=/usr/sbin/snmptrapd -Lsd -f -m ALL -p /run/snmptrapd.pid
If things work out, after the
bsnmp -T
call, information such asJul 18 13:57:37 bsys-docdev snmptrapd[23559]: 2022-07-18 13:57:37 gnom.os.its-lehmann.de [UDP: [192.168.0.55]:52424->[192.168.0.44]:162]: DISMAN-EXPRESSION-MIB::sysUpTimeInstance = Timeticks: (0) 0:00:00.00 SNMPv2-MIB::snmpTrapOID.0 = OID: ITS-Bacula-MIB::baculaNotifyJob ITS-Bacula-MIB::baculaJobName = STRING: Test-Job-Ignore ITS-Bacula-MIB::baculaJobResult = INTEGER: stopped(4)
should be logged.
See also
Go back to:
Go to:
Go back to the Bacula Simple Network Management Protocol (bsnmp) chapter.
Go back to the Jobs Monitoring chapter.
Go back to the main Bacula Enterprise Management page.