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?
check_open_files.pl plugin not working/ not taking threshold
Re: check_open_files.pl plugin not working/ not taking thres
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":
This plugin seems to reference the following file:
Which, from this RedHat article, contains the following:
I could be wrong though. This is the first time I've ever heard of this plugin.
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)
Code: Select all
/proc/sys/fs/file-nrSo 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.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).
I could be wrong though. This is the first time I've ever heard of this plugin.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: check_open_files.pl plugin not working/ not taking thres
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.
[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
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/
Or, you can search the exchange site for a plugin that checks the absolute number of open files.
https://exchange.nagios.org/
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_open_files.pl plugin not working/ not taking thres
I got the solution, it is checking the file in/proc filesystem for max open files. so i gave thresholds according to it.
thanks.
thanks.
Re: check_open_files.pl plugin not working/ not taking thres
Your welcome. Shall I close and lock the post as solved?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_open_files.pl plugin not working/ not taking thres
YEs, You can close, thanks