Table of Contents

How to Install and Monitor Windows 11 with Nagios Cross-Platform Agent (NCPA)

Picture of Ayub Huruse
Ayub Huruse

In today’s fast-paced IT environments, effective monitoring is key to maintaining system performance and reliability. The Nagios Cross-Platform Agent (NCPA) offers a streamlined solution to monitor systems across a wide range of operating systems. In this guide, we’ll walk you through the process of installing and configuring NCPA on Windows 11, helping you achieve optimal performance and real-time visibility with ease.

Active vs Passive Monitoring

NCPA supports two types of monitoring methods:

  • Active Monitoring: Nagios actively performs checks on a schedule.
  • Passive Monitoring: NCPA submits check results to Nagios.

Recommendation: Active monitoring is typically preferred for most use cases, as it allows Nagios to schedule and control checks.

Prerequisites

Before beginning the installation, ensure the following requirements are met:

  • A system running Windows 11
  • Administrator privileges
  • Stable internet connection

Verify your Windows version by running the following command in PowerShell:

systeminfo | findstr /B /C:"OS Name" /C:"OS Version"

Example Output:

OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22631 N/A Build 22631

Step 1: Download the NCPA Package

To download the latest NCPA package for Windows, visit:

Nagios NCPA Downloads Page

Download the appropriate installer package for your system.

Step 2: Install the NCPA Package (Graphical Method)

  1. Navigate to the location where the installer was downloaded.
  2. Double-click the installer to launch the installation wizard.
  3. Follow these steps:
    • Click Next on the Welcome screen.
Screenshot 2025 01 17 150305
Example output of the NCPA Setup

4. Accept the license agreement by clicking I Agree.

Screenshot 2025 01 17 151911
Example output of the license agreement

5. Configure passive checks (optional) by providing a token for authentication. Keep the default Bind IP (0.0.0.0) and port (5693) settings.

6. Click Next and proceed through the installation steps, selecting the installation directory if needed.

Screenshot 2025 01 17 155145
Example output of the configuration

7. Click Install to begin the installation.

Screenshot 2025 01 17 162051
Example output of the destination folder

8. Once the installation is complete, click Finish.

Screenshot 2025 01 20 144951
Example output of the completed installation step.

Step 2 (Alternative): Silent Installation Method

Silent installation is useful for deploying NCPA on multiple machines.

Command Syntax

ncpa-<version>.exe /S /TOKEN='mytoken' /<variable>='<value>' /D=<base directory>

Key Configuration Variables

  • TOKEN: (Required) Token for the web GUI and API access.
  • IP: IP address to bind to (default: 0.0.0.0).
  • PORT: Port to bind to (default: 5693).
  • NRDPURL: URL for passive check submissions.
  • NRDPTOKEN: Authentication token for NRDP.
  • NRDPHOSTNAME: Hostname for NRDP passive checks.

Example Command:

ncpa-2.1.6.exe /S /TOKEN='Str0ngT0k3n' /NRDPURL='http://10.25.5.12/nrdp/'
/NRDPTOKEN='NRDP_T0k3n' /NRDPHOSTNAME='S1601'

Step 3: Configure NCPA

After installation, configure NCPA by editing the configuration file:

  1. Open ncpa.cfg located in the NCPA installation directory.
  2. Set your token by updating the following line: community_string = mytoken
  3. Save and close the file.

Step 4: Restart NCPA Service

To apply the changes, restart the NCPA service:

Restart-Service ncpa_listener
Restart-Service ncpa_passive

Step 5: Configure Firewall (if enabled)

If your firewall is enabled, allow traffic on port 5693:

  1. Open PowerShell as Administrator.
  2. Run the following command:
New-NetFirewallRule -DisplayName "Allow NCPA" -Direction Inbound -Protocol TCP -LocalPort 5693 -Action Allow

Step 6: Test NCPA Installation

1. Open the Windows search bar and type Services.

Screenshot 2025 02 10 084547
Example output of the services system in the search bar

2. Scroll down and locate Nagios Cross-Platform Agent.

Screenshot 2025 02 10 084753
Example output of the NCPA running automatic.

3. Verify that the service is running.

4. Additionally, open a web browser and navigate to:

https://<NCPA_IP_Address>:5693/

5. Bypass the security warning for the self-signed certificate by clicking Advanced and selecting Proceed.

6. On the NCPA login page, enter the API token you configured earlier and click Log In.

Configuring Nagios XI

To monitor the Windows system using Nagios XI and the NCPA agent:

  1. Navigate to the Nagios XI dashboard.
  2. Open the NCPA wizard by selecting Configure > Run a Monitoring Wizard > NCPA.
  3. Enter the required details, including the IP address of the Windows server and the API token.
  4. Complete the wizard setup and apply configuration changes.
Screenshot 2025 02 10 090305
Example of NCPA step 1

Verifying Monitoring Setup

After completing the wizard, Nagios XI should display the monitored host and its services:

  1. Navigate to the Service Status page to confirm that the system is being monitored.
Screenshot 2025 02 10 090746
Example output of the Host status detail.

Troubleshooting Tips

  • Issue: NCPA agent not starting.
    • Solution: Verify that the token and port configurations are correct.
  • Issue: Passive checks not received by Nagios.
    • Solution: Ensure the NRDP URL and token match the Nagios server settings.
  • Issue: Firewall blocking NCPA communication.
    • Solution: Allow traffic on port 5693.

Conclusion

By following this guide, you have successfully installed and configured the Nagios Cross Platform Agent on your Windows system. For additional support, refer to the Nagios Support Forum or the Nagios Knowledge Base.

Share this post