willixix / naglio-plugins

Monitoring Plugins by William Leibzon
http://william.leibzon.org/nagios/
77 stars 54 forks source link

check_file - failure under embedded perl #32

Open heinemannj opened 11 years ago

heinemannj commented 11 years ago

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$ }

willixix commented 11 years ago

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

heinemannj commented 11 years ago

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,".

willixix commented 11 years ago

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

heinemannj commented 11 years ago

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,".