Setting up NRPE check for winfile plugin get this
Check Windows Temp Folder Notifications for this service have been disabled UNKNOWN 07-23-2017 18:09:00 0d 0h 23m 14s 3/3 Incorrect command line arguments supplied
In my NSCLIENT.ini
Code: Select all
; A list of scripts available to run from the CheckExternalScripts module. Syntax is: <command>=<script> <arguments>
[/settings/external scripts/scripts]
; Check Windows Temp Folder
check_winfile = scripts\\check_winfile.exe $ARG1$ $ARG2$ $ARG3$
I placed the check_winfile.exe in the folder c:\program files\nsclient++\scripts folder
After I updated the nsclient.ini file saved it and then restarted the nsclient service.
On the Nagios server
In my Commands.cfg file added this command
Code: Select all
define command{
command_name check_winfile
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 120 -c check_winfile --target c:\windows\temp --filter "size gt 1073741824" -delete
}
Code: Select all
define service {
host_name SERVER1
service_description Check Windows Temp Folder
check_command check_nrpe!check_winfile
servicegroups Windows Temp
check_interval 1
check_period backup_WIN08P
notification_period backup_WIN08P
use generic-service
}
root@serv17:/usr/lib/nagios/plugins# ./check_nrpe -H 10.2.8.33 -t 120 -c check_winfile -a --target c:\windows\temp --filter "size gt 10737411824" --delete
./check_nrpe: unrecognized option '--filter'
./check_nrpe: unrecognized option '--delete'
FRom the server I ran the command from a dos prompt
C:\Program Files\NSClient++\scripts>check_winfile --target c:\windows\temp --filter "size gt 1073741824" -delete
Can't opendir(c:\windows\temp/vmware-SYSTEM): Invalid argument
at check_winfile.pl line 81
FILE OK - 0 files out of 16 to consider |'selected files'=0;;; 'all files'=16 'deleted files'=0
Any ideas
Thanks
Tom