Page 1 of 1
check_open_files.pl plugin not working/ not taking threshold
Posted: Fri Jun 23, 2017 8:38 am
by srikgali
I can not able to use check_open_files.pl plugin in RHEL 6.8 , I getting below error
[root@<hostname> libexec]# ./check_open_files.pl -w 500 -c 1000
OK: open files (2176) is below threshold (1933510/3867020)|open_files=2176;1933510;3867020
even though i gave warning threshold 500 & critical 1000, It is taking different thresholds and giving me output is ok.
I want to know how this plugin works?
Re: check_open_files.pl plugin not working/ not taking thres
Posted: Fri Jun 23, 2017 8:49 am
by mcapra
I'm not sure which version you're using, but the
--warning and
--critical arguments seem to be in terms of percentages and not absolute counts of "open files":
Code: Select all
[root@nagios libexec]# ./check_open_files.pl -h
v$Revision: 1.1 $ (nagios-plugins 2.2.1)
The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
Copyright (c) 2007 Christophe Thiesset
Usage: -w <warn> -c <crit> [-t <timeout>] [-v version] [-h help]
Checks the open files number against the max autorized
-w (--warning) = Percentage of opened files to generate warning alert
-c (--critical) = Percentage of opened files to generate critical( w < c )
-t (--timeout) = Plugin timeout in seconds (default = 15)
-h (--help)
-v (--version)
This plugin seems to reference the following file:
Which, from
this RedHat article, contains the following:
The file-nr file displays three parameters:
- the total allocated file handles.
- the number of currently used file handles (with the 2.4 kernel); or the number of currently unused file handles (with the 2.6 kernel).
- the maximum file handles that can be allocated (also found in /proc/sys/fs/file-max).
So what the plugin appears to do is looks at the total allocated file handles, checks it against the maximum file handles that can be allocated, and uses the
--warning and
--critical arguments to represent some percentage of
maximum file handles / allocated file handles.
I could be wrong though. This is the first time I've ever heard of this plugin.
Re: check_open_files.pl plugin not working/ not taking thres
Posted: Fri Jun 23, 2017 8:59 am
by srikgali
Thanks for your reply, the plugin version that i am using.
[root@wsvmlnlhp01 libexec]# ./check_open_files.pl --version
v$Revision: 1.1 $ (nagios-plugins 2.0.3)
So I do need to calculate what threshold i need to set, This is plugin is working as expected in AIX.
Re: check_open_files.pl plugin not working/ not taking thres
Posted: Fri Jun 23, 2017 1:28 pm
by tgriep
Yes, to use that plugin, you would have to calculate the percentage of open files and use that for the thresholds.
Or, you can search the exchange site for a plugin that checks the absolute number of open files.
https://exchange.nagios.org/
Re: check_open_files.pl plugin not working/ not taking thres
Posted: Mon Jul 17, 2017 1:45 pm
by srikgali
I got the solution, it is checking the file in/proc filesystem for max open files. so i gave thresholds according to it.
thanks.
Re: check_open_files.pl plugin not working/ not taking thres
Posted: Mon Jul 17, 2017 2:51 pm
by tgriep
Your welcome. Shall I close and lock the post as solved?
Re: check_open_files.pl plugin not working/ not taking thres
Posted: Mon Jul 17, 2017 3:01 pm
by srikgali
YEs, You can close, thanks