fixed critical/warning date calculation
authorMatthias Förste <foerste@schlittermann.de>
Tue, 26 Apr 2011 10:43:49 +0200
changeset 107 048c548ff05b
parent 106 5cd52564c236
child 108 86ae7838a013
fixed critical/warning date calculation
dnsnagios/check_dnssec
--- a/dnsnagios/check_dnssec	Tue Apr 26 10:37:10 2011 +0200
+++ b/dnsnagios/check_dnssec	Tue Apr 26 10:43:49 2011 +0200
@@ -34,8 +34,8 @@
 my $opt = {
     'index-host' => '84.19.194.5',
     'index-zone' => 'idx.net.schlittermann.de',
-    warning      => 12,
-    critical     => 72
+    warning      => 72,
+    critical     => 12
 };
 
 my $rv = {
@@ -73,7 +73,7 @@
 my $now = time;
 my $dates;
 for (qw(critical warning)) {
-    my @d = gmtime $opt->{$_} * 3600;
+    my @d = gmtime $now + $opt->{$_} * 3600;
     $dates->{$_} = sprintf "%04d" . "%02d" x 5, $d[5] + 1900, $d[4] + 1,
       reverse @d[ 0 .. 3 ];
 }