NagiosEnterprises / nagiosbpi

Nagios Business Process Intelligence

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NagiosBPI

Nagios Business Process Intelligence

NagiosBPI is used to group important services together to form a cohesive unit. Say you have an apache cluster made up of four servers, and you want to monitor the health of the site they're hosting. If one of four servers goes down, is that really something you need to be warned about? Wouldn't you rather be warned when two go down?

That's what this plugin was made for!

Installation on Nagios XI

  1. Download the zip file onto a machine that can access XI from the web interface.

  2. For upgrades:

    cp /usr/local/nagiosxi/html/includes/components/nagiosbpi/bpi.conf /tmp/bpi.conf
    
  3. Go to the Admin->Manage Components page.

  4. Upload the zip file using the upload tool on the page.

  5. Execute the following commands on the server's console:

    chmod +x /usr/local/nagiosxi/html/includes/components/nagiosbpi/set_bpi_perms.sh
    /usr/local/nagiosxi/html/includes/components/nagiosbpi/set_bpi_perms.sh
    
  6. Nagios BPI should now be accessible from the main-left menu of Nagios XI.

Installation on Nagios Core

  1. Download the source code as a zip file and unzip it into your /tmp directory on your Nagios server.

  2. Copy the nagiosbpi folder from your unzipped location to inside of your Nagios directory or your preferred location that is accessible by your webserver. This location could be dependent on your linux distribution, but for the following example we'll use /usr/local/nagios/share.

    cd /path/to/n/nagiosbpi 
    
  3. Execute the permissions script as the root user:

    chmod +x set_bpi_perms.sh
    ./set_bpi_perms.sh
    
  4. Edit the contents of the constants.conf file to match your directory locations. Make sure to use absolute locations!

  5. Launch Nagios BPI from your web browser http://YOURSERVER/nagios/nagiosbpi.

  6. Start creating new BPI groups using the built-in configuration tools.

Running a check for BPI Groups on Nagios XI

Download and install the BPI Wizard to create checks for your BPI groups.

Running a check for BPI Groups on Nagios XI

  1. Download the check_bpi.php script

  2. Edit the check_bpi.php file to point to the directory location of the 'api_tool.php' file.

    Example:

      #!/usr/bin/php 
      <?php
      $file = '/var/www/http_public/nagiosbpi/api_tool.php'; 
      include($file);
    
  3. Copy this file to the directory of your nagios check plugins. (Example: /usr/local/nagios/libexec/)

  4. Make sure the file is executable.

     chmod +x /usr/local/nagios/libexec/check_bpi.php
    
  5. In your nagios/etc directory, locate your commands.cfg and add the following definition:

     define command {
        command_name          check_bpi
        command_line          $USER1$/check_bpi.php $ARG1$
     }
    
  6. Create a dummy host definition similar to the following:

     define host {
        host_name             bpigroups
        use                   generic_host
        display_name          BPI Groups
        check_command         check_dummy!0
        address               1.0.0.0
        register              1
     }
    
  7. Create service definitions like the following, use the BPI Group ID as the argument.
    This can by found my mousing over the group name in the web interface, or by finding the define [groupID] statement in your bpi.conf file.

     define service {
        host_name             bpigroups
        service_description   My BPI Group 
        use                   generic_service
        check_command         check_bpi!myBpiGroupID
        register              1
     }   
    

    A sample BPI group definitions:

    • This group contains services and another group:

       define MyStuff {
           title=My Stuff
           desc=This is a test group for Nagios BPI
           primary=1
           info=www.yourwebsite.com
           members=localhost;PING;&, 192.168.5.11;Ping;&, $YourStuff;&, 
           warning_threshold=2 
           priority=1 
           critical_threshold=3
       }
      
    • This is a group with only services:

       define YourStuff {
           title=Your Stuff
           desc=This is a group with services only 
           primary=1
           info=http://www.example.com
           members=localhost;HTTP;&, localhost;SSH;&, localhost;Swap Usage;&, 
           warning_threshold=0
           priority=1
           critical_threshold=3
       }
      

License Notice

Copyright (c) 2010-2017 Nagios Enterprises, LLC

This work is made available to you under the terms of Version 2 of the GNU General Public License. A copy of that license should have been provided with this software, but in any event can be obtained from http://www.fsf.org.

This work is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 or visit their web page on the internet at http://www.fsf.org.

Questions?

If you have questions about this addon, or encounter problems getting things working along the way, your best bet for an answer or quick resolution is to check the Nagios Support Forums.

About

Nagios Business Process Intelligence

License:GNU General Public License v2.0


Languages

Language:PHP 91.8%Language:JavaScript 4.8%Language:CSS 3.3%Language:Shell 0.1%