OP5 Monitor ["OP5 Monitor"]
["Technical Reference"]

Nagios Remote plugin Executor (NRPE) plugin version 4

Overview

Beginning OP5 Monitor 8.2.1, the check_nrpe4 (version 4) plugin is available in addition to the check_nrpe (version 2) plugin.

The check_nrpe4 plugin is located in /opt/plugins/check_nrpe4, and is not backward-compatible with the check_nrpe plugin, which remains in /opt/plugins/check_nrpe to avoid affecting existing check commands. For more information, see the Plugin reference.

For new installations of OP5 Monitor 8.2.1 or above, a check command check_nrpe4 is included for you to quickly use the check_nrpe4 plugin.

For existing installations that have updated to OP5 Monitor 8.2.1, you will have to create the check command for the check_nrpe4 plugin manually. The following sections provide examples of how to switch to the check_nrpe4 plugin from the check_nrpe plugin:

Update existing services

To update existing services to use the new check_nrpe4 plugin, you first need to create a new check command.

Example scenario

In this example scenario, the host segot01 has two services that use the check_nrpe plugin:

  • Total processes uses the check_nrpe check command with command argument check_total_procs. The check_nrpe check command preconfigured in OP5 Monitor uses the plugin of the same name. Example output from Test this check:
  • _USER1_/check_nrpe -s -H 10.0.0.81 -c check_total_procs
    Result code: OK
    PROCS OK: 80 processes | procs=80;150;200;0;
  • Logged in users uses the check_nrpe_users check command, which is implicitly configured to pass the command check_users to the check_nrpe plugin. Example output from Test this check:
  • _USER1_/check_nrpe -s -H 10.0.0.81 -c check_users
    Result code: OK
    USERS OK - 1 users currently logged in |users=1;5;10;0

Both services use a check command configured with the -s option to run check_nrpe, which forces an SSL connection for version 2 of the plugin. In version 4 of the plugin, the -s option has a different function and can be removed.

Create a check command

In this example scenario, you will create a new check command that uses the new check_nrpe4 plugin.

  1. In OP5 Monitor, go to Manage > Configure.
  2. In the Configuration page, click Commands.
  3. Under Create new command:
    1. In the command_name field, enter check_nrpe4.
    2. In the command_line field, enter $USER1$/check_nrpe4 -H $HOSTADDRESS$ -c $ARG1$.
  4. Click Submit.
  5. On the top-right corner, click Save.
  6. In the Save configuration page, click Save my changes.

Success: The new check_nrpe4 check command can now be used for existing implementations.

After you have created the new check command, you can then edit the services to use the new check_nrpe4 plugin:

Edit the total processes service

In this example, you will edit the Total processes service to use the new check_nrpe4 check command you have created:

  1. In the Services List view, look for Total processes and click Configure this service under Actions.
  2. Under Edit service:
    1. In the check_command field, update the value from check_nrpe to check_nrpe4.
    2. Click Test this check the verify that the new check command works:
    3. _USER_/check_nrpe4 -H 10.0.0.81 -c check_total_procs
      Result code: OK
      PROCS OK: 80 processes | procs=80;150;200;0;
  3. Click Submit.
  4. On the top-right corner, click Save.
  5. In the Save configuration page, click Save my changes.

Success: The Total processes service now uses the new check_nrpe4 check command.

Edit the logged in users service

In this example, you will edit the Logged in users service to use the new check_nrpe4 check command you have created:

Note: This example applies for other services that use the check_nrpe_xyz check commands. For example, check_nrpe_load, check_nrpe_swap, and so on.

  1. In the Services List view, look for Logged in users and click Configure this service under Actions.
  2. Under Edit service:
    1. In the check_command row, click Syntax help to display the command line of the selected check command:
    2. Command line of selected check command:
      $USER1$/check_nrpe -s -H $HOSTADDRESS$ -c check_users

    3. Copy the arguments after the -c option from the command line. In this example, it is check_users.
    4. In the check_command field, update the value to check_nrpe4.
    5. In the check_command_args field, paste the argument you copied. In this example, it is check_users.
    6. Click Test this check the verify that the new check command works:
    7. _USER1_/check_nrpe4 -H 10.0.0.81 -c check_users
      Result code: OK
      USERS OK - 1 users currently logged in |users=1;5;10;0
  3. Click Submit.
  4. On the top-right corner, click Save.
  5. In the Save configuration page, click Save my changes.

Success: The Logged in users service now uses the new check_nrpe4 check command.

Update existing check commands

Before you begin

When you change a check command to use a new plugin, all services using that check command are affected.

To see which services use a particular check command, use the OP5 Monitor UI to perform a filter query on your browser address bar.

For example, the following query filters out services that use the check_nrpe_users check command:

https://HOST/monitor/index.php/listview/?q=%5Bservices%5D%20check_command%20%3D%20%22check_nrpe_users%22

Edit the check command

In this example, you will update the check command check_nrpe_users to use the new check_nrpe4 plugin:

Note: This example applies for other services that use the check_nrpe_xyz check commands. For example, check_nrpe_load, check_nrpe_swap, and so on.

  1. In OP5 Monitor, go to Manage > Configure.
  2. In the Configuration page, click Commands.
  3. Under Command to edit, select check_nrpe_users and click Go.
  4. Under Edit command, update the command_line field value.
    • Old value: $USER1$/check_nrpe -s -H $HOSTADDRESS$ -c check_users
    • New value: $USER1$/check_nrpe4 -H $HOSTADDRESS$ -c check_users
  5. Click Submit.
  6. On the top-right corner, click Save.
  7. In the Save configuration page, click Save my changes.

Success: The check_nrpe_users check command now uses the new check_nrpe4 plugin.