Script Installation

  1. Put the file bsnmp into a location on the DIR host where the DIR can execute programs in. We propose to use /opt/bacula/scripts

  2. Make the file executable by the Bacula DIR user account, usually bacula:

    chown bacula. /opt/bacula/scripts/bsnmp
    chmod u+x /opt/bacula/scripts/bsnmp
    
  3. Ensure python3 is available: python3 --version should not fail.

  4. Ensure the needed dependencies are installed. This can be somewhat difficult and may depend on distribution and python installation. In typical cases, with package based installations (i.e., no pip-based ones and no virtual environments and such things):

    $ python3
    Python 3.7.3 (default, Jan 22 2021, 20:04:44)
    [GCC 8.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import argparse
    >>> import configparser
    >>> from pysnmp.hlapi import *
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'pysnmp'
    >>>
    

    indicates the module providing snmp functionality is not installed. On a Debian (based) system, apt-get install python3-pysnmp4 python3-pysmi might install what is needed (proper dependencies, also for other distributions, will be sorted out later).

  5. The python snmp module needs a local directory writeable by itself. This needs to be created for the Bacula DIR user, as the home directory for this user is not writable:

    mkdir /opt/bacula/.pysnmp"
    chown bacula: /opt/bacula/.pysnmp/
    

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.