Nsclient++ 0.3.9.327 - check_files script
Posted: Wed Sep 19, 2018 3:54 am
Hello,
I'm trying to monitor number of files in some folder using script check_files (default script with installation nsclient++, author of script is [email protected] 2010-12-21), but without success. Can somebody help me how should I configure NSC.ini properly in order to recognise command from nagios? And also maybe I'm using wrong script, so If somebody have a good one, pls notice that or send me.
This is what I put in nsc.ini:
[Wrapped Scripts]
check_files=check_files.vbs
Command that I tried from Nagios directly from folder libexec:
./check_nrpe -H 192.168.99.107 -t 30 -c check_files -a path='E:\\TEST' pattern=*.* 'warning=count>5' 'critical=count>10' top-syntax='${status}: ${problem_count}/${count} files' 'empty-state=ok'
I got this:
0
Usage: check_files /path:<value> [/namefilter:<value>] [/age:<value>] [/selage:<value>] [/searchdepth:<value>] [/seldat:<value>] [/size:<value>] [/warning:<value>] [/critical:<value>] [/expectmatch:<value>] [/weekdays:<value>] [/alias:<value>]
/path Path
[/namefilter] Filename Filter
[/age] Age
[/selage] newer, older, hour, ignore
[/searchdepth] depth of subdirs to search
[/seldat] modified or created
[/size] size
[/warning] warning threshold
[/critical] critical threshold
[/expectmatch] expect at least x matches
[/weekdays] 1,2,3,... 1-Sun 2-Mon 3-Tue...
[/alias] Alias
I'm trying to monitor number of files in some folder using script check_files (default script with installation nsclient++, author of script is [email protected] 2010-12-21), but without success. Can somebody help me how should I configure NSC.ini properly in order to recognise command from nagios? And also maybe I'm using wrong script, so If somebody have a good one, pls notice that or send me.
This is what I put in nsc.ini:
[Wrapped Scripts]
check_files=check_files.vbs
Command that I tried from Nagios directly from folder libexec:
./check_nrpe -H 192.168.99.107 -t 30 -c check_files -a path='E:\\TEST' pattern=*.* 'warning=count>5' 'critical=count>10' top-syntax='${status}: ${problem_count}/${count} files' 'empty-state=ok'
I got this:
0
Usage: check_files /path:<value> [/namefilter:<value>] [/age:<value>] [/selage:<value>] [/searchdepth:<value>] [/seldat:<value>] [/size:<value>] [/warning:<value>] [/critical:<value>] [/expectmatch:<value>] [/weekdays:<value>] [/alias:<value>]
/path Path
[/namefilter] Filename Filter
[/age] Age
[/selage] newer, older, hour, ignore
[/searchdepth] depth of subdirs to search
[/seldat] modified or created
[/size] size
[/warning] warning threshold
[/critical] critical threshold
[/expectmatch] expect at least x matches
[/weekdays] 1,2,3,... 1-Sun 2-Mon 3-Tue...
[/alias] Alias