Hi.
Im having problem with this plugin. I hope someone will help me out
The problem is I'm having problems excluding file types,
example in backup directory (backup root directory bac2014) I have backup files witch I need to monitor (backup file name:0001,0002,0003,0004)
the problem is I also have logs from backups in root directory witch are getting changed every minute (backup.log)
So if I run this plugin, plugin will say no warning no critical becouse he is checking logs witch have last time of 1min.
Is there any way to exclude file types from plugin search? like to exclude *.log etc..? So that plugin will search only backups not logs...
the plugin im using is:
http://exchange.nagios.org/directory/Pl ... ge/details
Best ragards
check_newest_file_age problem with excluding
Re: check_newest_file_age problem with excluding
First, this sub forum is for nagios-plugins - as in the package, so I will move this to general core.
This plugin does not support exclusions. You could alter the $file_list (line #282) var to include your exclusions:
This plugin does not support exclusions. You could alter the $file_list (line #282) var to include your exclusions:
Code: Select all
file_list=`ls -t $full_path | grep -v "log\|etc"`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.
"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.
Re: check_newest_file_age problem with excluding
thank you. works perfectly
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_newest_file_age problem with excluding
Excellent, thanks for letting us know!