Install Icinga2 with Debian or Ubuntu

Configure the BigPanda agent to send monitoring alerts from Icinga2.

The BigPanda agent is a low-footprint utility installed on the master host of your monitoring tool. It consumes alerts from the tool in real-time and then transmits them to BigPanda via TLS-encrypted HTTP calls.

❗️

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

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

  1. Ensure python3 is installed with the following command:

    $ sudo apt install -y python3
    
  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 on Debian or Ubuntu

Connect to the host where your Icinga2 server is installed, and install the BigPanda agent package.

  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 of Debian or Ubuntu, 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. Update the repo list and install the BigPanda agent package.

    $ sudo apt update
    $ sudo apt install -y bigpanda-agent
    

    Note: For the OIM, bigpanda-agent v10.0.0+ is required.

Troubleshooting:

Error:

E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?

Solution:

$ sudo ln -sf /usr/lib/apt/methods/http /usr/lib/apt/methods/https
$ sudo apt install -y apt-transport-https
$ sudo apt update

Configure Icinga2

The BigPanda agent uses Icinga2 status.dat and compatibility log to generate alerts. Both files will be created by Icinga2 only after enabling the compatlog and statusdata features. To enable those feature, run the following commands on your Icinga2 server:

$ sudo icinga2 feature enable compatlog statusdata
$ sudo service icinga2 restart

Configure the BigPanda Agent

Generate the agent's configuration file:

$ sudo bigpanda-config --init --token <Your Org Bearer Token>

And add the Icinga2 plugin with the application key you created in step 1:

$ sudo bigpanda-config --add icinga2 --app-key <Your App Key>

When prompted, specify the locations of icinga.log, status.dat, and objects.cache files.

The script output should look like this:

Log File Path: /var/log/icinga2/compat/icinga.log
Status Dat Path: /var/cache/icinga2/status.dat
Objects Cache Path: /var/cache/icinga2/objects.cache

Of course, the actual paths will depend on your installation.

Update Permissions

Give the agent read permissions to the objects.cache, status.dat and log files. A possible way to do it:

$ sudo usermod -a -G "<GROUP OF OBJECT CACHE FILE>,<GROUP OF LOG FILE>,<GROUP OF STATUS DAT FILE>" bigpanda

Start the BigPanda Agent

$ sudo service bigpanda start

Success

You should be able to see all your active Icinga2 alerts in the Incidents tab.