I have a host with which folder path is attached.
I want to tweak that "folder path" that it will send an alert when certain number files in that path exceeds. eg: if number to files exceeds to 100 in that folder it gives an alert.
??
Code: Select all
check_count = cscript.exe //T:30 //NoLogo scripts\check_files.vbs $ARG1$Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <windows server ip address> -c check_count -a '<arguments>'Code: Select all
/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_count -a '-p C:\TEMP -r -w 100 -c 200'
OK: 6 files were matched.|'count'=6
/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_count -a '-p C:\TEMP -r -w 5 -c 10'
WARNING: 6 files were matched.|'count'=6
/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_count -a '-p C:\TEMP -r -w 1 -c 2'
CRITICAL: 6 files were matched.|'count'=6Code: Select all
/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_count -a '-h'
Check_Files - Nagios NRPE plugin for windows, ver. 2009.11.1
Copyright (C) 2009, Alex Simenduev
Usage: check_files.vbs -p <path> [-r] [-f <filter>] -w <warn> -c <crit> |'-h
Command-line'=0 'options:
-p,'=0 '--path'=0 '<path>'=0 ':'=0 'folder'=0 'path
-r,'=0 '--recursive'=0 ':'=0 'check'=0 'directories'=0 'recursively
-f,'=0 '--filter'=0 '<filter>'=0 ':'=0 'add'=0 'filter'=0 'to'=0 'files,'=0 'can'=0 'be'=0 'specifed'=0 'more'=0 'than'=0 'once
-w,'=0 '--warn'=0 '<warn>'=0 ':'=0 'set'=0 'WARNING'=0 'state
-c,'=0 '--crit'=0 '<crit>'=0 ':'=0 'set'=0 'CRITICAL'=0 'state
-h,'=0 '--help'=0 ':'=0 'print'=0 'this'=0 'help'=0 'message
Avaliable'=0 'filters:
'=0 'Size,'=0 'AgeCreated,'=0 'AgeAccessed,'=0 'AgeModified,'=0 'RegEx
Examples:
'=0 'check_files.vbs'=0 '-p'=0 'C:\Windows\Temp'=0 '-w'=0 '100'=0 '-c'=0 '200
'=0 'Count'=0 'files'=0 'in'=0 'C:\Windows\Temp,'=0 'return'=0 'WARNING'=0 'if'=0 'number'=0 'of
'=0 'files'=0 'more'=0 'than'=0 '100'=0 'and'=0 'CRITICAL'=0 'if'=0 'more'=0 'than'=0 '2Unfortunately WMI cannot run custom pluginslinearstack wrote:We are using wmi for monitoring and authentication and have not setup NSCA/ NSclient.
Can suggest a wmi plugin to perform this??