i have my monitoring Linux server with
NRPE Plugin for Nagios
Version: 3.2.1
and i installed on the windows machine NSClient++
with this .bat script.
set setupfile="NSCP-0.5.2.35-x64.msi"
msiexec /l install.log /i %setupfile% CONF_CAN_CHANGE="TRUE" ALLOWED_HOSTS="1.2.3.4/32,127.0.0.1/32" CONF_NRPE="TRUE" CONF_CHECKS="TRUE" CONF_NSCLIENT="FALSE" CONF_WEB="FALSE" CONF_NSCA="FALSE" /quiet
copy "nrpe_dh_2048.pem" "C:\Program Files\NSClient++\security\nrpe_dh_2048.pem"
cd "C:\Program Files\NSClient++"
nscp.exe settings --activate-module "NRPEServer" --add-defaults
nscp.exe settings --path "/modules" --key "CheckDisk" --set "enabled"
nscp.exe settings --path "/modules" --key "CheckSystem" --set "enabled"
nscp.exe settings --path "/settings/default" --key "bind to" --set ""
nscp.exe settings --path "/settings/NRPE/server" --key "ssl options" --set "no-sslv2,no-sslv3,no-tlsv1"
nscp.exe settings --path "/settings/NRPE/server" --key "dh" --set "${certificate-path}/nrpe_dh_2048.pem"
nscp.exe settings --path "/settings/NRPE/server" --key "allow arguments" --set "true"
nscp.exe settings --path "/settings/log" --key "level" --set "warning"
net stop nscp
net start nscp
my command looks like:
./check_nrpe --v2-packets-only -H 172.16.0.1 -p 5666 --unknown-timeout --command="Check_drivesize"
How can i filter for disk C:
only? or change the warning/critical threshold?
The examples did not work https://docs.nsclient.org/reference/windows/CheckDisk/#check_drivesize_samples
eg.
./check_nrpe --v2-packets-only -H 172.16.0.1 -p 5666 --unknown-timeout --command="Check_drivesize" "crit=free<10%" "drive=c:"
Output:
OK All 3 drive(s) are ok|'C:\ used'=12.46093GB;15.54609;17.48935;0;19.43261 'C:\ used %'=64%;80;90;0;100 'A:\ used'=0B;0;0;0;0 'D:\ used'=0B;0;0;0;0