diff options
author | Greg Sabino Mullane | 2010-02-12 14:01:54 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2010-02-12 14:01:54 +0000 |
commit | a5ace512adfb5d3c016a5fe15a5e430d96ce9384 (patch) | |
tree | 19d6e72f5a0f5cebf9d26cb272640317d9d50285 /check_postgres.pl | |
parent | e3e75565ae7fe47ba8411e9659c4a16145a97efd (diff) |
Don't use $^T - dangerous as Nagios caches the script!
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 52bed3c71..e5e2c0e4c 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -3733,7 +3733,7 @@ sub check_logfile { ## We now have a logfile (or a template)..parse it into pieces. ## We need at least hour, day, month, year - my @t = localtime $^T; + my @t = localtime; my ($H,$d,$m,$Y) = (sprintf ('%02d',$t[2]),sprintf('%02d',$t[3]),sprintf('%02d',$t[4]+1),$t[5]+1900); if ($logfile !~ $logfilere) { ndie msg('logfile-bad',$logfile); @@ -8073,8 +8073,9 @@ Items not specifically attributed are by Greg Sabino Mullane. =over 4 -=item B<Version 2.14> +=item B<Version 2.14.1> + Don't use $^T in logfile check, as script may be long-running Change the error string for the logfile action for easier exclusion by programs like tail_n_mail |