dnsnagios/check_dnssec
changeset 107 048c548ff05b
parent 106 5cd52564c236
child 108 86ae7838a013
equal deleted inserted replaced
106:5cd52564c236 107:048c548ff05b
    32 my $VERSION = "0.1";
    32 my $VERSION = "0.1";
    33 
    33 
    34 my $opt = {
    34 my $opt = {
    35     'index-host' => '84.19.194.5',
    35     'index-host' => '84.19.194.5',
    36     'index-zone' => 'idx.net.schlittermann.de',
    36     'index-zone' => 'idx.net.schlittermann.de',
    37     warning      => 12,
    37     warning      => 72,
    38     critical     => 72
    38     critical     => 12
    39 };
    39 };
    40 
    40 
    41 my $rv = {
    41 my $rv = {
    42     OK       => 0,
    42     OK       => 0,
    43     WARNING  => 1,
    43     WARNING  => 1,
    71 }
    71 }
    72 
    72 
    73 my $now = time;
    73 my $now = time;
    74 my $dates;
    74 my $dates;
    75 for (qw(critical warning)) {
    75 for (qw(critical warning)) {
    76     my @d = gmtime $opt->{$_} * 3600;
    76     my @d = gmtime $now + $opt->{$_} * 3600;
    77     $dates->{$_} = sprintf "%04d" . "%02d" x 5, $d[5] + 1900, $d[4] + 1,
    77     $dates->{$_} = sprintf "%04d" . "%02d" x 5, $d[5] + 1900, $d[4] + 1,
    78       reverse @d[ 0 .. 3 ];
    78       reverse @d[ 0 .. 3 ];
    79 }
    79 }
    80 
    80 
    81 my $counter;
    81 my $counter;