Moving from NCPA to ReChecked Agent (rcagent)

To start using ReChecked Manager (or if you just want to use the agent) you will need to install at least one ReChecked Agent (rcagent) to sync with the manager. If you already have NCPA agents set up on your hosts, the process is twofold. You may have checks that are already configured for NCPA that will need to be converted into rcagent. We will go over how to make those changes in Nagios XI or Nagios Core depending on your situation.

Step 1: Download, Install, Configure

To start, you should download the latest version of rcagent from our downloads page.
Note: If you’re using Linux (CentOS, RHEL, Ubuntu, or Debian) you can use repos to install your agents instead of manually downloading the binary.

You can follow the installation instructions from our docs, and once you’re done installing it, make sure you update the token from the default token name (private) before continuing.

For larger deployments it may be useful to use ansible to deploy the agent and the config changes required in order for it to work such as setting the token, sync settings for manager (in step 2), etc.

If you have any passive checks you have configured on your NCPA systems, you’ll need to change them to the equivalent in rcagent, which uses YAML configuration files. You can read more about setting up passive checks in rcagent in the passive check documentation.

Step 2: Add to ReChecked Manager (Optional)

If you are using ReChecked Manager, open the “Add Agents” button on the top right corner of the interface. You can follow along with this step by step process. This will also explain how to do the previous step with various options. You will need to copy from step 2 with the API key to your configuration file for rcagent and restart the agent. Once this is done, you should see the agent appear in a few seconds.

Once the agent has been added, it will sync secrets and any configurations that should be applied to all agents. You can manually apply configs to this agent or add the agent to a group to apply configurations. It will also sync any plugins and senders that are required to make the configs function.

Step 3: Add the Plugin

You have a couple options for installing the plugin. If you’re using Nagios XI follow the instructions below otherwise you’ll need to manually install the plugin.

Install the Config Wizard (Nagios XI)

If you are using Nagios XI, installing the config wizard will also install the check_rcagent.py plugin.

Download the wizard (rcagent.zip) file and upload it in Admin > Manage Config Wizards > Upload and upload the file to install.

This will also let you create active checks via the config wizard like you do with NCPA from inside Nagios XI. You will have the same features for making active checks as you would with NCPA using the config wizard.

Manual Install (Nagios Core)

Manually installing check_rcagent.py is very simple, you can download the plugin and place it in your Nagios plugins directory, which is normally at one of the following locations:

/usr/local/nagios/libexec
/usr/lib/nagios/plugins
/usr/lib64/nagios/plugins

You will also need to create a new check command for the check_rcagent.py plugin, something like this should do:

define command {
    command_name check_rcagent
    command_line $USER1$/check_rcagent.py -H $HOSTADDRESS$ $ARG1$
}

For more information on setup for Nagios Core, you can check out the configuration instructions.

Step 4: Change Nagios Configs

This is the most time consuming step in the conversion, if you are mostly using active checks that are defined in Nagios then you will need to log into the Nagios XI interface and edit the checks in the CCM. Otherwise, you’ll need to manually edit the Nagios Core config files to change the checks there.

Here’s an example of an NCPA check command’s $ARG1$ arguments and how you would change it for rcagent:

-t 'mytoken' -P 5693 -M cpu/percent -w '20' -c '40' -q 'aggregate=avg'

Now for rcagent, there are some slight differences. Most notably the major difference is using -e instead of -M for the endpoints. Here’s the version for rcagent:

-t 'private' -P 5995 -e cpu/percent  -w '70' -c '90'

The check_command would also need to be changed to check_rcagent rather than check_ncpa as well.

There are other differences for some other endpoints, such as services, network, and even disk. There are examples and you can view a plugin example by clicking on “Plugin” for each of these endpoints in the linked documentation.

Step 5: Verify Changes

Make sure you restart your rcagents if you make any changes for passive checks. Also verify that your Nagios Core or Nagios XI system is receiving the passive checks or all your active checks are properly functioning.

When using ReChecked Manager for passive checks, you will not need to restart the agent in order for the checks to apply, you can configure the checks in the manager and they will sync. You can verify that any configured checks you make in the manager show up in your agents as well. The process of syncing can take about a minute.