Install NagiosBPI Business Process Intelligence with Icinga or Nagios

Overview

So here you go, you have nagios up and running monitoring the services and one fine day the manager shows up, asks you about drupal service uptime that you have been monitoring. Now the thing is that Drupal service as a whole depends on apache, the database service and DNS resolution working properly, any of the child services not working properly would make the Drupal site unavailable to the clients. So you have been monitoring these three services separately but when you are asked for the service uptime report you need to combine these three. The plugin that can help you in this case is called the Nagios Business Process Intelligence.

Install NagiosBPI Business Process Intelligence with Icinga or Nagios

This assumes you have a working instance of Nagios or Icinga.

Download and unzip the package

Edit check_bpi.php in a browser of choice

Change the file parameter to point to api_tool.php

Copy check_bpi plugin to the plugins directory

Open the commands.cfg file

Append the following to create new commands

Create a new conf file for nagiosbi under apache conf directory
On CentOS RHEL Fedora

On Ubuntu Debian

Append the following to it

Restart apache
On CentOS RHEL

On Debian Ubuntu

Next you need to create a New Group with all the services and hosts that makes a service work.

Open a web browser and head over to

http://ipaddress-or-domainname/nagiosbpi

Create a new group, choose your group ID wisely we would need it in future.
nagiosbpi01 1024x6011 300x176 Install NagiosBPI Business Process Intelligence with Icinga or Nagios

Add members to the group, for my setup I added http, mysql and dns ip resolution to the group as without any one of these my drupal site will not work.
nagiosbpi03 300x176 Install NagiosBPI Business Process Intelligence with Icinga or Nagios

nagiosbpi08 300x176 Install NagiosBPI Business Process Intelligence with Icinga or Nagios

Now for some strange reason I could not change the group threshold value for critical and warning values from the web interface, these values are set so to change the group combined state to warning or critical, I have set the critical threshold to 1 as any one of the service member in a critical state would result in a total loss of service. You need to edit the conf file and set the critical threshold.

vi /usr/local/nagiosbpi/bpi.conf

Change the value as per your wish

nagiosbpi09 1024x6011 300x176 Install NagiosBPI Business Process Intelligence with Icinga or Nagios

Create a new conf file and declare a dummy host and a service for our group

Append the following to it, make sure you change the groupID from Drupal in service declaration below to your groupID which was created from the nagiosbpi web interface.

Open nagios.cfg file

Append the following to it

Restart Nagios

Now to see has it worked, I have purposely stopped apache daemon on my drupal machine. Results in the screenshots below

nagiosbpi10 300x176 Install NagiosBPI Business Process Intelligence with Icinga or Nagios

nagiosbpi11 1024x6013 300x176 Install NagiosBPI Business Process Intelligence with Icinga or Nagios