QuickStart Tutorial: How to Import Existing Nagios BPI Configuration

As of version 3.2.1, one of quickest ways to get started with RealOpInsight is to use your existing Nagios BPI configuration, which, as we’ll see in this tutorial, can be easily imported and converted to a RealOpInsight description file. The resulting description file can then be used with both RealOpInsight Workstation and RealOpInsight Ultimate. And this will take you only a few clicks. Yes, no more.

Prerequisites

To run all the steps of this tutorial successfully, you must meet the following conditions:

  • We assume that you have a Nagios installation along with the BPI addon installed, configured and operating correctly.
  • Further, your Nagios installation must have the MK Livestatus broker module installed and enabled over a TCP xinetd socket. If not the case, refer to the official documentation of MK Livestatus for details. If not the case, refer to the official documentation of MK Livestatus for detailed instructions.
  • You must have RealOpInsight Workstation installed and ready to use. If not, refer to the installation guide.

Summarized Steps

  1. Run the RealOpInsight Editor and select the menu File -> Import Nagios BPI Configuration
  2. From the source selection window that’ll appear, select the path to your Nagios BPI configuration file (bpi.conf).
  3. Select the source id to associate to the data points that’ll be imported. Note that only sources previously configured as Nagios sources will be visible in the selection box.
  4. Click on OK to start the importation and wait that the importation completes.
  5. Select the menu File -> Save As to save the result of the importation as a RealOpInsight description file. This shall open a file selection window to let you select the destination path as well as the format of the description file.
  6. Note that the selected source id will be appended to each data point. Hence, you must make sure to save the resulting file as a Multi-source description file. You can do this by selecting the appropriate file type in the file selection window.
  7. Finally, run the RealOpInsight Operation Console and select the file previously saved to visualize the result.

Detailed Steps

  1. Run the RealOpInsight Editor and select the menu File -> Import Nagios BPI Configuration

    ../_images/realopinsight-editor-import-nagios-bpi-menu.png
  2. From the source selection window that’ll appear, select the path to your Nagios BPI configuration file (bpi.conf) as well as the source id to associate to the data points that’ll be imported.

    ../_images/import-nagios-bpi-file-and-source-selection.png

    Note that only sources previously configured as Nagios sources will be visible in the selection box. For this tutorial, Source0 has been set as a Nagios source and points to a Nagios XI installation. We use the default BPI configuration shipped out with Nagios XI. The file has the following content:

        define localServices1 {
           title=Local Services
           desc=Example BPI Group
           primary=1
           info=http://localhost
           members=localhost;Current Load;&, localhost;Current Users;&, localhost;HTTP;&, localhost;PING;|,
           warning_threshold=1
           critical_threshold=2
           priority=1
    }
    
        define localServices2 {
           title=More Local Services
           desc=Demo Group 2
           primary=1
           info=http://localhost/nagios
           members=$localServices1;&, localhost;Root Partition;|, localhost;SSH;&, localhost;Swap Usage;&, localhost;Total Processes;&,
           warning_threshold=3
           critical_threshold=4
           priority=2
        }
    

    In short, this configuration describes two services groups with id localServices1 and localServices2. The two services are top level services (primary=1), and their members attribute indicates that the state of the group localServices1 depends on the states of the services Current Load, Current Users, HTTP, and PING (essential, |) on Nagios server (localhost), while the state of the group localServices2 depends on the state of the group localServices1 combined with the states of the services Root Partition (essential), SSH, Swap Usage, and Total Processes on Nagios server (localhost). They both services use special thresholds to trigger severity escalation when certain number of services are in problem (see their warning_threshold and critical_threshold attributes).

    Read the Nagios BPI documentation to learn more on how it works.

  3. Click on OK to start the importation and wait that the importation completes. As you may see on the following screenshot (red area), the selected source id has be be automatically appended to all the data points.

    ../_images/realopinsight-editor-import-nagios-bpi-completed.png
  4. Select the menu File -> Save As to save the result as a RealOpInsight description file.

    Since the source id is appended to the idenfiers of data points, you must make sure to save the resulting file as a Multi-source description file as shown on the figure below, you can do this by selecting the appropriate file type in the file selection window.

    ../_images/realopinsight-editor-select-file-type.png
  5. That’s it, you’re done. The resulting description file can then be used with both RealOpInsight Workstation and RealOpInsight Ultimate. The following screenshot has been taken from the Workstation edition. As you may observe, all the Nagios BPI groups have been imported along with their associated grouping rules.

    Important notes:

    • All top level services are wrapped under a global root service named Nagios BPI Services;
    • All the dependencies among groups are maintained, this concerns essential services, thresholds, and group clustering.
    • More important, contrary to Nagios BPI that does not display orphaned groups (i.e. non-primary groups that are independent of any other group), RealOpInsight automatically attachs all orphaned groups to the global root service that it created.
    ../_images/realopinsight-visualize-nagios-bpi-config.png