Example snmptrapd Configuration for Testing Purposes

  1. 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.

  2. Install all possibly needed MIBs on the designated snmp receiver host as outlined above.

  3. 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) start snmptrapd. 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.

  4. 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
    
  5. If things work out, after the bsnmp -T call, information such as

    Jul 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.

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.