naglio-plugins icon indicating copy to clipboard operation
naglio-plugins copied to clipboard

check_file - failure under embedded perl

Open heinemannj opened this issue 10 years ago • 4 comments

If the file count of the checked directory is zero the following error under nagios embedded perl appears:

**ePN /usr/lib/nagios/plugins/check_files.pl: "Use of uninitialized value $oldest_filetime in concatenation (.) or string at (eval 4) line 755,".

Using normal perl interpreter it works without problems.

nagios core (3.x) - 3.5.0-79.1.x86_64 (2013-06-28)

Define a service to check rsyslog queue.

define service{ use local-service hostgroup_name elma-server servicegroups elma-services service_description Syslog Queue check_command check_local_files!'Syslog Queue /var/spool/rsyslog'!/var/spool/rsyslog!'dbq.*'!10!100 }

'check_local_files' command definition

define command{ command_name check_local_files command_line $USER1$/check_files.pl -a -f -L $ARG1$ -D $ARG2$ -F $ARG3$ -w $ARG4$ -c $ARG5$ }

heinemannj avatar Jul 14 '13 03:07 heinemannj

should be fixed in 0.417 version of check_files I committed to github yesterday

willixix avatar Jul 18 '13 20:07 willixix

Another issue appears if the file count of the checked directory is zero (error under nagios embedded perl):

**ePN /usr/lib/nagios/plugins/check_files.pl: "Use of uninitialized value $oldest_secold in concatenation (.) or string at (eval 1) line 777,".

heinemannj avatar Aug 11 '13 12:08 heinemannj

Fixed in check_file v0.421 that has just been committed.

willixix avatar Aug 18 '13 03:08 willixix

Another issue appears if the file count of the checked directory is zero (error under nagios embedded perl):

**ePN /usr/lib/nagios/plugins/check_files.pl: "Use of uninitialized value $largest_filesize in concatenation (.) or string at (eval 1) line 797,".

heinemannj avatar Aug 26 '13 09:08 heinemannj