Nagios Installation Instructions

How to Integrate Nagios with BigPanda

Create an App Key

First create an App Key. You'll need a separate App Key for each integrated system.

Select an Install Method:

RedHat
CentOS
Debian
Ubuntu

RedHat

Install the BigPanda Agent on RedHat

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

$ sudo wget http://repos.bigpanda.io/config/bigpanda.repo -O /etc/yum.repos.d/bigpanda.repo
$ sudo yum install bigpanda-agent

Note: If you run RHEL 5, you will need to install the EPEL repository. Please consult the FAQ for instructions.

Configure the BigPanda Agent

1. Configure the agent to work with Nagios Notifications integration by running the following commands:

bigpanda-config --init --token <YOUR TOKEN>
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 one of the following commands:

  • For RHEL 5 and 7:

    sudo service bigpanda start

  • For RHEL 6:

    sudo initctl start bigpanda

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.

  • For RHEL 5 and 7:

    sudo service nagios restart

  • For RHEL 6:

    sudo initctl restart nagios

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.

CentOS

Install the BigPanda Agent on CentOS

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

$ sudo wget http://repos.bigpanda.io/config/bigpanda.repo -O /etc/yum.repos.d/bigpanda.repo
$ sudo yum install bigpanda-agent

Note: If you run CentOS 5, you will need to install the EPEL repository. Please consult the FAQ for instructions.

Configure the BigPanda Agent

1. Configure the agent to work with Nagios Notifications integration by running the following commands:

bigpanda-config --init --token <YOUR TOKEN>
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 one of the following commands:

  • For CentOS 5 and 7:

    sudo service bigpanda start

  • For CentOS 6:

    sudo initctl start bigpanda

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.

  • For CentOS 5 and 7:

    sudo service nagios restart

  • For CentOS 6:

    sudo initctl restart nagios

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.

Debian

Install the BigPanda Agent on Debian

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

$ echo deb http://repos.bigpanda.io/deb `lsb_release -c -s` main | sudo tee /etc/apt/sources.list.d/bigpanda.list
$ curl https://repos.bigpanda.io/config/bigpanda.pub | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install bigpanda-agent

Configure the BigPanda Agent

1. Configure the agent to work with Nagios Notifications integration by running the following commands:

bigpanda-config --init --token <YOUR TOKEN>
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:

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.

Ubuntu

Install the BigPanda Agent on Ubuntu

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

$ echo deb http://repos.bigpanda.io/deb `lsb_release -c -s` main | sudo tee /etc/apt/sources.list.d/bigpanda.list
$ curl https://repos.bigpanda.io/config/bigpanda.pub | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install bigpanda-agent

Configure the BigPanda Agent

1. Configure the agent to work with Nagios Notifications integration by running the following commands:

bigpanda-config --init --token <YOUR TOKEN>
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:

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.