Monitoring Google Cloud VMs with Nagios XI Using NCPA: A Complete Guide
- Updated on

In today’s cloud-driven world, staying ahead of performance issues and security threats is non-negotiable. Your Google Cloud Virtual Machines (VMs) power critical applications, but without the right monitoring, unexpected downtime or resource spikes can disrupt operations. That’s where Nagios XI steps in—offering real-time insights, proactive alerts, and deep visibility into your cloud infrastructure.
This guide will walk you through seamlessly integrating Google Cloud VMs with Nagios XI using the Nagios Cross-Platform Agent (NCPA) and the Google Cloud Configuration Wizard—so you can monitor system health, optimize performance, and ensure uptime like a pro.
By the end of this guide, you’ll have successfully:
- Installed and configured NCPA on your Google Cloud VM.
- Set up Nagios XI to monitor essential system metrics.
- Used the Google Cloud Configuration Wizard for seamless integration.
Prerequisites
Before you begin, make sure you have the following:
- A Google Cloud account with access to the Google Cloud Console.
- A Google Cloud VM (Linux, Windows, or other supported operating systems).
- Nagios XI installed and ready for configuration.
- Firewall rules configured to allow inbound traffic on port 5693 (TCP) for NCPA communication.
You’ll also need to install NCPA on the target machine you want to monitor. The installation steps for NCPA on your desired operating system (Windows, RHEL, CentOS, Ubuntu, Debian, or SLES) are available in the NCPA Installation Documentation.
Step 1: Deploy a Google Cloud Virtual Machine
To start, you’ll need to deploy a Google Cloud VM:
- Log in to the Google Cloud Console at Google Cloud Console.
- Create a New VM Instance:
- Navigate to Compute Engine → VM Instances → Create Instance.
- Select the operating system you wish to deploy (Linux or Windows) and configure the necessary settings.
- Ensure Network Accessibility:
- Open port 5693 (TCP) for NCPA communication in the firewall settings.
- If your Nagios XI server is external to Google Cloud, enable external access to the VM.
Once your Google Cloud VM is up and running, you can proceed with NCPA installation.
Step 2: Install and Configure NCPA on the Google Cloud VM
NCPA is essential for gathering system metrics like CPU usage, memory, disk space, and network traffic. Follow the official installation guide for your specific operating system (Windows, RHEL, CentOS, Ubuntu, Debian, or SLES).
After installing NCPA, ensure it is correctly configured:
- Start the NCPA Listener: Ensure the listener service is running to enable communication.
- Set up the API Token: This token will authenticate the communication between Nagios XI and the Google Cloud VM.
- Verify the Installation: Open a browser and visit
https://<google-cloud-vm-ip>:5693/api
to confirm that the NCPA API is accessible.- If the API is not accessible, check the firewall settings to ensure port 5693 is open.
Step 3: Use the Google Cloud Configuration Wizard in Nagios XI
Nagios XI simplifies the integration process with its Google Cloud Configuration Wizard. Here’s how to use it:
1. Log into Nagios XI: Open your Nagios XI dashboard.
2. Navigate to Configuration Wizards:
- In the top menu bar, go to Configure → Configuration Wizards.
- Select the Google Cloud wizard.

3. Enter the Required Information:
- Host Address or FQDN: Enter the address or Fully Qualified Domain Name (FQDN) of the Google Cloud VM you want to monitor.
- Port Number: If you’ve changed the default port number from 5693, specify it here.
- API Token: Enter the token you configured during NCPA setup.
4. Click Next to continue.

Step 4: Configure Monitoring Options
In this step, you’ll define what metrics you want to monitor and set thresholds:
- Host Name: Enter a valid host name for your Google Cloud VM.
- Select Metrics: Choose which system metrics to monitor, such as:
- CPU Usage
- Memory Usage
- Disk Usage
- Network Traffic
- Adjust Thresholds: Set warning and critical thresholds for each metric to match your monitoring requirements.
- Best Practices for Thresholds: Set CPU warnings at 80% usage and critical alerts at 90% to prevent performance degradation.
Once you’ve selected all necessary options, click Next.
Step 5: Finalize the Configuration
- Nagios XI will apply the configuration, which may take a few minutes.
- Review and confirm all settings.
- Complete the wizard steps, selecting any additional options as needed.
- Click Finish to create the new host and service.
Step 6: View and Verify Monitoring Status
Once the configuration is applied:
- View Host Status: Navigate to the Host Status page and locate your Google Cloud VM.
- Verify Metrics: Ensure that all selected metrics (e.g., CPU, memory, disk, network) are being actively monitored.
- Adjust Alerts: If necessary, fine-tune alert thresholds and notifications to ensure you are promptly informed of any performance issues.
Troubleshooting Common Issues
- NCPA agent not responding? Check firewall settings to ensure port 5693 is open.
- Metrics not showing? Verify API token and ensure the NCPA listener is running.
- Nagios XI not detecting the host? Ensure the VM’s external IP is correct and accessible.
Conclusion
By following these steps, you’ve successfully integrated your Google Cloud VM into Nagios XI, enabling comprehensive monitoring of your cloud infrastructure. With NCPA and the Google Cloud Configuration Wizard, you can effortlessly track performance metrics, receive alerts, and maintain optimal operation of your Google Cloud resources.
This integration ensures that your IT team can proactively manage cloud environments, ensuring high availability and reliability of critical systems.