check_client_cert.pl
changeset 2 e6a93f3c4bd5
parent 0 f405871d0603
child 4 14408207746e
equal deleted inserted replaced
1:5acc6b846267 2:e6a93f3c4bd5
    33     UNKNOWN   => 3,
    33     UNKNOWN   => 3,
    34     DEPENDENT => 4
    34     DEPENDENT => 4
    35 );
    35 );
    36 
    36 
    37 my $ME      = basename $0;
    37 my $ME      = basename $0;
    38 my $VERSION = "0.1";
    38 my $VERSION = "0.1.1";
    39 
    39 
    40 sub get_status($);
    40 sub get_status($);
    41 sub report($);
    41 sub report($);
       
    42 sub version($$);
    42 
    43 
    43 my %opt = (
    44 my %opt = (
    44     file     => "/root/CLIENT-CERTS/status.dat",
    45     file     => "/root/CLIENT-CERTS/status.dat",
    45     warning  => "1month",
    46     warning  => "1month",
    46     critical => "1week"
    47     critical => "1week"
   134         say "CERT OK: " . join( " ", @ok );
   135         say "CERT OK: " . join( " ", @ok );
   135         exit $ERRORS{"OK"};
   136         exit $ERRORS{"OK"};
   136     }
   137     }
   137 }
   138 }
   138 
   139 
       
   140 sub version($$) {
       
   141     my $progname = shift;
       
   142     my $version  = shift;
       
   143 
       
   144     print <<_VERSION;
       
   145 $progname version $version
       
   146 Copyright (C) 2011 by Christian Arnold and Schlittermann internet & unix support.
       
   147 
       
   148 $ME comes with ABSOLUTELY NO WARRANTY. This is free software,
       
   149 and you are welcome to redistribute it under certain conditions.
       
   150 See the GNU General Public Licence for details.
       
   151 _VERSION
       
   152 }
       
   153 
   139 __END__
   154 __END__
   140 
   155 
   141 =head1 NAME
   156 =head1 NAME
   142 
   157 
   143 check_client_cert - nagios plugin to check ssl client certificate expire date
   158 check_client_cert - nagios plugin to check ssl client certificate expire date
   200 
   215 
   201 =back
   216 =back
   202 
   217 
   203 =head1 VERSION
   218 =head1 VERSION
   204 
   219 
   205 This man page is current for version 0.1 of check_client_cert.
   220 This man page is current for version 0.1.1 of check_client_cert.
   206 
   221 
   207 =head1 AUTHOR
   222 =head1 AUTHOR
   208 
   223 
   209 Written by Christian Arnold L<arnold@schlittermann.de>
   224 Written by Christian Arnold L<arnold@schlittermann.de>
   210 
   225