Skip to main content

Install SNMP with Debian or Ubuntu

Python compatibility

To use the Open Integration Manager for Agent-based integrations, Python version>= 3.8.0 and an Agent version >= 10.2 are required.

Prerequisites

Note: These instructions were last tested on Debian 11 (bullseye) and Ubuntu 24.04 (noble) with bigpanda-agent 10.4.6 and bigpanda-snmpd 4.5.0.

python >= 3.8 and python-pip3 should be installed prior to installing the bigpanda-agent and bigpanda-snmpd packages.

  1. Ensure python3 and pip3 are installed with the following command:

    $ sudo apt install -y python3 python3-pip
  2. Verify the install with the following commands:

    $ python3 --version
    $ pip3 --version

Note: If pip3 was not installed as a dependency, it can be installed with sudo apt install -y python3-pip.

Note: Access to JFrog, pypi, and yum repositories are required to install all dependencies.

Install the BigPanda Agent

  1. Ensure packages are installed prior to downloading the BigPanda agent package:

    $ sudo apt update && sudo apt install -y gnupg2 curl lsb-release
  2. Add the BigPanda repository and download the OpenPGP key:

    $ echo deb https://bigpandaio.jfrog.io/artifactory/int-deb `lsb_release -c -s` main | sudo tee /etc/apt/sources.list.d/bigpanda.list
    $ curl -sL https://bigpandaio.jfrog.io/artifactory/api/security/keypair/bigpanda/public | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/bigpanda.gpg > /dev/null
    • The --dearmor option is for unpacking input from an OpenPGP ASCII armored key.

    • Since apt-key is marked to be deprecated on future releases, it is preferred to manage keyring files in trusted.gpg.d instead.

    • Note: apt-key can still be used in place of OpenPGP, but it is less secure.

      $ curl -sL https://bigpandaio.jfrog.io/artifactory/api/security/keypair/bigpanda/public | sudo apt-key add -
  3. Connect to the host where your SNMP trap server is installed, and install the BigPanda agent package:

    $ sudo apt update
    $ sudo apt install -y bigpanda-agent
  4. Install the BigPanda SNMP daemon:

    $ sudo apt install -y bigpanda-snmpd

Configure the BigPanda Agent

  1. Configure the agent to work with the Raw Alerts Transfer plugin by running the following commands:

    $ sudo bigpanda-config --init --token <Your Org Bearer Token> --server-url https://api.bigpanda.io --alert-url https://integrations.bigpanda.io
    $ sudo bigpanda-config --add rawalertstransfer --app-key <Your App Key>

    Note: Remove the trailing /oim from the --alert-url value before you run the command (for example, https://integrations.bigpanda.io). The BigPanda Agent adds /oim/api/alerts to this URL, so keeping /oim makes alerts fail with HTTP 404 in /var/log/bigpanda/agent.log. If you already ran the command, run it again with --force and the corrected URL, then run the --add rawalertstransfer command again.

Configure the BigPanda SNMP Agent

  1. If any MIBs are not included by default, they need to be compiled and added manually:

    $ cd /opt/bigpanda/bigpanda-snmpd/mib_compiler
    $ sudo ./compile_mib.sh --input-directory <path to MIBs> --output-directory /etc/bigpanda/snmpd/conf/
  2. Modify Config Files

    For MIBs that are to be monitored, their respective Event Configuration files must be added to the bigpanda-snmpd configuration file:

    Edit /etc/bigpanda/snmpd/snmp-daemon.json, and add the paths to the event_config files to the processing.event-configs array.

    For example:

    $ sudo vim /etc/bigpanda/snmpd/snmp-daemon.json
    
    ...
    
    {
      <snip>
      "processing": {
        "mibs-dir": "/etc/bigpanda/snmpd/mibs",
        "event-configs": [
          event_configs/example.json,
          <ADD EVENT CONFIGS HERE>
        ],
        "target-dir": "/var/lib/bigpanda/queue",
        "stress_test": false
      }
      </snip>
    }

Start the Services

  1. Start the BigPanda agent and snmpd services by running the following commands:

    $ sudo service bigpanda start
    $ sudo service bigpanda-snmpd start

Test the Integration

  1. Install SNMP Utils:

    $ sudo apt install -y snmp
  2. Send the test SNMP v2 trap:

    $ sudo snmptrap -v 2c -c public 127.0.0.1:5000 1 1.3.6.1.2.1.1 1.3.6.1.2.1.1.5 s "production-switch-1" 1.3.6.1.2.1.1.1 s "SNMP trap test"

    Note: Since it is a test message, it won’t be resolved automatically. Click Resolve incident in the BigPanda UI to manually resolve it.

  3. Set up the config file to receive SNMP v3 traps:

    Note: Network discovery must be performed to capture the engine id and user details prior to testing SNMP v3.

    Add the security object to the snmp config file: /etc/bigpanda/snmpd/snmp-daemon.json.

    "security": {
        "local_engine_id": "8000000001020304",
        "users": [
        {
            "username": "panda",
            "level": "authPriv",
            "auth_protocol": "usmHMACSHAAuthProtocol",
            "privacy_protocol": "usmAesCfb128Protocol",
            "auth_key": "snmpauthpass123",
            "privacy_key": "snmpkeypass123",
            "engine_id": "8000000008675309"
        },
        {
            "username": "new-panda",
            "level": "authPriv",
            "auth_protocol": "usmHMACSHAAuthProtocol",
            "privacy_protocol": "usmAesCfb128Protocol",
            "auth_key": "snmpauthpass123",
            "privacy_key": "snmpkeypass123",
            "engine_id": "8000000008888888"
        }
      ]
    },

    Note: local_engine_id is the local client’s engine id, and can be ommitted. This engine id is generated in memory if not provided.

  4. Send an SNMP v3 test trap:

    $ sudo snmptrap -v3 -e 0x8000000008675309 -u panda -l authPriv -a SHA -A snmpauthpass123 -x AES -X snmpkeypass123 127.0.0.1:5000 "" 1.3.6.1.2.1.1 1.3.6.1.2.1.1.5 s "production-switch-v3" 1.3.6.1.2.1.1.1 s "SNMP v3 trap test"