nagios-plugins-file_age-2.1.4-2.el6.x86_64 can't find any fi

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

nagios-plugins-file_age-2.1.4-2.el6.x86_64 can't find any fi

Postby NzBQG » Wed Jan 11, 2017 8:53 am

2.1.4 from EPEL seems to have broken the check_file_age plugin. What can I do?

Code: Select all
[box ~]$ sudo touch this /this
[box ~]$ /usr/lib64/nagios/plugins/check_file_age -f this
FILE_AGE CRITICAL: File not found - "this"
[box ~]$ /usr/lib64/nagios/plugins/check_file_age -f /root/
FILE_AGE CRITICAL: File not found - "/root/"
[box ~]$ /usr/lib64/nagios/plugins/check_file_age -f /this
FILE_AGE CRITICAL: File not found - "/this"



Code: Select all
[box ~]$ strace /usr/lib64/nagios/plugins/check_file_age -f /this
execve("/usr/lib64/nagios/plugins/check_file_age", ["/usr/lib64/nagios/plugins/check_"..., "-f", "/this"], [/* 33 vars */]) = 0
brk(0)                                  = 0xf02000
[...cut...]
read(3, "", 4096)                       = 0
close(3)                                = 0
lstat("\"/this\"", 0x7ffce9439ae0)      = -1 ENOENT (No such file or directory)
stat("\"/this\"", 0xf02130)             = -1 ENOENT (No such file or directory)
write(1, "FILE_AGE CRITICAL: File not foun"..., 44FILE_AGE CRITICAL: File not found - "/this"
) = 44
NzBQG
 
Posts: 1
Joined: Wed Jan 11, 2017 8:49 am

Re: nagios-plugins-file_age-2.1.4-2.el6.x86_64 can't find an

Postby tmcdonald » Wed Jan 11, 2017 10:30 am

Yea, my strace gives the following for an older version:
Code: Select all
[root@localhost ~]# /usr/local/nagios/libexec/check_file_age --version
check_file_age v2.0.3 (nagios-plugins 2.0.3)
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.
[root@localhost ~]# /usr/local/nagios/libexec/check_file_age -f /this
FILE_AGE OK: /this is 31 seconds old and 0 bytes
[root@localhost ~]# strace -s 256 /usr/local/nagios/libexec/check_file_age -f /this
[ - SNIP - ]
stat("/this", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
stat("/this", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
write(1, "FILE_AGE OK: /this is 46 seconds old and 0 bytes\n", 49FILE_AGE OK: /this is 46 seconds old and 0 bytes
) = 49

Almost looks like the plugin is doing some escaping of the filename for some reason. Let me peek at the code and get back to you.
Want to see me get thrown into a box? https://www.youtube.com/watch?v=pGSlqxIMxQM
User avatar
tmcdonald
Support Manager
 
Posts: 7929
Joined: Mon Sep 23, 2013 8:40 am

Re: nagios-plugins-file_age-2.1.4-2.el6.x86_64 can't find an

Postby tmcdonald » Wed Jan 11, 2017 10:51 am

Looks like this was fixed today, actually:

https://github.com/nagios-plugins/nagio ... s/pull/222
Want to see me get thrown into a box? https://www.youtube.com/watch?v=pGSlqxIMxQM
User avatar
tmcdonald
Support Manager
 
Posts: 7929
Joined: Mon Sep 23, 2013 8:40 am


Return to Nagios Core

Who is online

Users browsing this forum: Yahoo [Bot] and 13 guests