Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
I have configure check_winfile plugin to check some directory, for example as below.
check_files = scripts\check_winfile.exe --target "C:\dments" --filter "name match \.fail$" --warn 1 --critical 2
How to force the plugin to only check the contents of this folder without subdirectories. Because now checks several thousand files in the subdirectories instead of just a few in the main folder.
This option specifies targets to check. A target can be a simple file or a recursive list of files in a directory. You can specify several comma separated targets for one --target option, as well as several --target options. At least one is required.
So I would set the target to just the sub-directories you want searched.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
I'm not sure that i understand you right. I see this help explanation earlier but i don't see answer there.
I have location C:\dments and inside about 30-40 files which i wanna check. But in C:\dments is also about 20 folders with 20-30k not important files and it's checked also.
Is It to check files in folder dments, only files without subdirectories?
As mentioned you will need to provide a direct path to each file if you do not want it to check everything in the directory, you can add additional files, by providing their paths in a coma separated list as the help output suggests. Give that a shot and let us know. If you are still having troubles post how you are manually running the command, including the directories in a coma separated list as I noted.
It should be real simple to setup as this is a built-in nsclient check.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.