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

Picture of Ayub Huruse
Ayub Huruse
Windows 7

Keeping IT systems running smoothly requires constant monitoring, and that’s where Nagios Cross-Platform Agent (NCPA) comes in. Whether you’re managing a single workstation or an entire network, NCPA provides real-time insights into system performance, helping you catch issues before they escalate. In this guide, you’ll learn how to install and configure NCPA on Windows 7, ensuring seamless monitoring and optimal system health. Let’s get started!

Active vs Passive Monitoring

NCPA supports two monitoring methods:

  • Active Monitoring: Nagios actively checks system metrics on a schedule.
  • Passive Monitoring: NCPA submits check results to Nagios when triggered.

Recommendation: Active monitoring is preferred for most cases, as it allows Nagios to control check scheduling.

Prerequisites

Before starting the installation, ensure the following:

  • A system running Windows 7
  • Administrator privileges
  • A stable internet connection

Verify your Windows version by running the following command in Command Prompt:

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

Example Output:

OS Name:      Microsoft Windows 7 Professional
OS Version:   6.1.7601 Service Pack 1 Build 7601

Step 1: Download the NCPA Package

To download the latest NCPA package for Windows, visit the Nagios NCPA Downloads Page. Download the appropriate installer for Windows 7.

Step 2: Install NCPA (Graphical Method)

  1. Locate the downloaded installer.
  2. Double-click to launch the installation wizard.
  3. Follow these steps:
    • Click Next on the Welcome screen.
    • Accept the license agreement.
    • Configure passive checks (optional) by setting an API token for authentication.
    • Keep the default Bind IP (0.0.0.0) and port (5693).
    • Click Install and wait for the process to complete.
    • Click Finish once installation is complete.

Step 2 (Alternative): Silent Installation

For deploying NCPA on multiple machines, use the silent installation method:

Command Syntax

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

Key Configuration Variables:

  • TOKEN (Required): API token for access.
  • 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='WIN7-PC'

Step 3: Configure NCPA

After installation, edit the NCPA configuration file:

  1. Navigate to the installation directory (default: C:\Program Files (x86)\Nagios\NCPA).
  2. Open ncpa.cfg in a text editor.
  3. Set the API token:
community_string = mytoken
  1. Save and close the file.

Step 4: Restart the NCPA Service

Apply changes by restarting the NCPA services:

net stop ncpa_listener
net start ncpa_listener
net stop ncpa_passive
net start ncpa_passive

Step 5: Configure Firewall (if enabled)

If Windows Firewall is enabled, allow traffic on port 5693:

  1. Open Command Prompt 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 Services window by typing services.msc in the Start menu.
  2. Scroll down and locate Nagios Cross-Platform Agent.
  3. Ensure the service is running.
  4. Open a web browser and navigate to: https://<NCPA_IP_Address>:5693/
  5. If prompted with a security warning, click Advanced and proceed.
  6. Log in using the API token.

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 03 11 141150
ncpa

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.
image 4
Host Status Details

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 7 system. For additional support, refer to the Nagios Support Forum or the Nagios Knowledge Base.

Share: