Skip to main content

Install Nagios with RedHat or CentOS

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.0 is required for the latest version of the BigPanda Agent, and will be installed by the BigPanda Agent installer if it does not exist.

  1. Ensure python3 is installed with the following command:

    $ sudo yum 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 yum install -y python3-pip.

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

Install the BigPanda Agent on RedHat or CentOS

Configure the BigPanda Agent

  1. Generate the agent's configuration file:

    $ sudo bigpanda-config --init --token <Your Org Bearer Token>
    $ sudo bigpanda-config --add nagios -notifications --app-key <Your App Key>
    
  2. Add the Nagios user to the bigpanda group by running the following command:

    sudo usermod -a -G bigpanda <Nagios username>
  3. Start the BigPanda agent service by running the following command for RHEL/CentOS 7 & 8:

     sudo service bigpanda start

Configure Nagios

Configure Nagios to send notifications to BigPanda.

  1. Edit the main configuration file (nagios.cfg). The default location is: /usr/local/nagios/etc/nagios.cfg.

    • Add the following line: cfg_file=/etc/bigpanda/bigpanda-contact.cfg

    • Ensure that notifications are enabled enable_notifications=1

  2. In the file where your host objects are defined (for example, templates.cfg):

    • Add the bigpanda contact to the contact_groups.

    • Set the notification_options for the host to: d,r,u,f,s.

    For example:

     define host{
             name                            generic-host
             contact_groups                  admins,bigpanda
             notification_period             24x7
             notification_options            d,r,u,f,s
     } 

    If the contact_groups option is not already listed in your definitions, you can add it.

  3. In the file where your service objects are defined (for example, templates.cfg):

    • Add the bigpanda contact to the contact_groups.

    • Set the notification_options for the service to: c,r,w,u,f,s.

    For example:

     define service{
             name                            generic-service
             check_period                    24x7
             contact_groups                  admins,bigpanda
             notification_interval           60
             notification_period             24x7
             notification_options            c,r,w,u,f,s
     } 

    If you have already configured notification options on a more specific template or definition, those settings will take precedence over the generic settings.

    To get the most out of this integration, ensure all of the desired notifications are sent to BigPanda.

  4. Restart the Nagios service.

     sudo service nagios restart

Test the Integration

  1. Run the following command:

     /usr/bin/bigpanda-notification --send-test

    A test alert should arrive in a few moments.

  2. In BigPanda, click the Incidents tab at the top of the screen.

  3. Confirm that the test alert was received.

  4. Since it's a test alert, it won't be resolved automatically. Click Resolve incident to manually resolve it.

Success

The next time Nagios sends a notification for an alert, you will see the alert in the Incident Dashboard.