Trying to monitor disk with ncpa-2.1.9 on windows server
Posted: Mon Sep 16, 2019 5:38 pm
I am running Nagios Core version 4.1.1. I am using the ncpa-2.1.9 and got the default setup done and a few windows server hosts in the Nagios UI. It is currently monitoring CPU usage, Memory Usage, and Process Count which is the default of the template that I copied from the Create Nagios checks of the Monitoring Windows Machines tutorial located here - https://assets.nagios.com/downloads/nag ... ndows.html
When I login to the windows host and go to the location - C:\Program Files (x86)\Nagios\NCPA\etc\ncpa.cfg.d and open the nrdp.cfg file this is the contents of the file:
So what I tried to do was add a disk entry to the ncpa.cfg file on the Nagios server where the CPU usage, Memory Usage, and Process Count are. This is what I tired to add:
Then I re-started the Nagios services and logged back into the Nagios UI and it did add the disk, but it was critical. Then under Status Information it says (Return code of 127 is out of bounds - plugin may be missing) and is always stays Critical. I have also added it a few different ways in the ncpa.cfg file which was really one line that I changed:
So I am not sure how to add the C:\ to be monitored by Nagios. When I login to the NCPA on the windows box it shows disks and interfaces. I would like to get both of these added if I can.
When I navigate to this path - /usr/local/nagios/libexec and run the command:
It comes back with - OK: Used_percent was 75.70 % | 'used_percent'=75.70%;90;95;
When I login to the windows host and go to the location - C:\Program Files (x86)\Nagios\NCPA\etc\ncpa.cfg.d and open the nrdp.cfg file this is the contents of the file:
Code: Select all
#
# AUTO GENERATED NRDP CONFIG FROM WINDOWS INSTALLER
#
[passive checks]
# Host check - This is to stop "pending check" status in Nagios
%HOSTNAME%|__HOST__ = system/agent_version
# Service checks
%HOSTNAME%|CPU Usage = cpu/percent --warning 80 --critical 90 --aggregate avg
%HOSTNAME%|Disk Usage = disk/logical/C:|/used_percent --warning 80 --critical 90 --units Gi
%HOSTNAME%|Swap Usage = memory/swap --warning 60 --critical 80 --units Gi
%HOSTNAME%|Memory Usage = memory/virtual --warning 80 --critical 90 --units Gi
%HOSTNAME%|Process Count = processes --warning 300 --critical 400Code: Select all
define service {
host_name Svr-Veeam
service_description Disk Usage
check_command check_ncpa!-t 'CMPublic' -P 5693 -M disk/logical/C:|/used_percent -w 80 -c 90 -u G
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}Code: Select all
check_command check_ncpa!-t 'CMPublic' -P 5693 -M disk/logical/C:|/used_percent --warning 80 --critical 90 --units Gi
check_command check_ncpa!-t 'CMPublic' -P 5693 -M disk/logical/C:|/used_percent -w 80 -c 90 -u GWhen I navigate to this path - /usr/local/nagios/libexec and run the command:
Code: Select all
./check_ncpa.py -H 172.17.20.4 -t CMPublic -M 'disk/logical/C:|/used_percent' --warning 90 --critical 95