Changeset 3866 for monitoring
- Timestamp:
- 10/23/13 17:56:29 (11 years ago)
- Location:
- monitoring/plugins/ids
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
monitoring/plugins/ids/check_shib_idp
-
Property
svn:keywords
set to
Id
r1986 r3866 1 1 #!/usr/bin/perl 2 2 # 3 # check_shib_idp, version 2012-06-133 # $Id$ 4 4 # 5 5 … … 111 111 $url =~ s|^/+||g; 112 112 $url =~ s|/+$||g; 113 my $ sp_status_url = sprintf('%s://%s/%s', ($use_ssl ? 'https' : 'http'),114 $host,115 $url);116 print STDERR "IDP URL: $ sp_status_url\n" if ($verbose > 0);113 my $idp_status_url = sprintf('%s://%s/%s', ($use_ssl ? 'https' : 'http'), 114 $host, 115 $url); 116 print STDERR "IDP URL: $idp_status_url\n" if ($verbose > 0); 117 117 118 118 my $browser = LWP::UserAgent->new; 119 my $response = $browser->get($ sp_status_url);119 my $response = $browser->get($idp_status_url); 120 120 if ($response->is_success) { 121 121 my $code = OK; -
Property
svn:keywords
set to
-
monitoring/plugins/ids/check_shib_sp
-
Property
svn:keywords
set to
Id
r1847 r3866 1 1 #!/usr/bin/perl 2 2 # 3 # check_shib_sp, version 2012-04-033 # $Id$ 4 4 # 5 5 … … 151 151 my $cert_warn_days = 31; 152 152 my $timeout = 10; 153 153 my $verbose = 0; 154 154 155 155 my $result = GetOptions("H=s" => \$host, … … 158 158 "S" => \$use_ssl, 159 159 "D=i" => \$max_clock_diff, 160 "C=i" => \$cert_warn_days); 160 "C=i" => \$cert_warn_days, 161 'v' => \$verbose); 162 161 163 if (!($result)) { 162 164 status(UNKNOWN, 'USAGE: -H <host> [-u <url>] [-t <timeout>] [-S] [-D <clock skew> -C <age>'); … … 167 169 status(UNKNOWN, 'missing manadorty parameter -H <host>'); 168 170 } 169 170 #print "Host: $host\nURL: $url\nUSE_SSL: $use_ssl\nCLOCK: $max_clock_diff\nCERT WARN: $cert_warn_days\n";171 171 172 172 local $SIG{ALRM} = sub { … … 181 181 $host, 182 182 $url); 183 184 print STDERR "SP URL: $sp_status_url\n" if ($verbose > 0); 185 183 186 my $browser = LWP::UserAgent->new; 184 187 my $response = $browser->get($sp_status_url); … … 190 193 }; 191 194 if ($@) { 192 status(CRITICAL, "error parsing XML response: " . $@); 195 my $msg = $@; 196 $msg =~ s/^\n*(.*)\s+at.*?\n*$/$1/gs; 197 status(CRITICAL, "error parsing XML response: " . $msg); 193 198 } 194 199 … … 235 240 if ($cert->checkend(0)) { 236 241 status(CRITICAL, 237 sprintf('%s certificate is expired since %s',242 sprintf('%s certificate has expired since %s', 238 243 $key->{'use'}, $cert->notAfter())); 239 244 } … … 241 246 my $expire_days = int(get_diff($cert->notAfter()) / 86400); 242 247 $code = WARNING; 243 $message = sprintf('%s certificate expiresin %d day(s)',248 $message = sprintf('%s certificate will expire in %d day(s)', 244 249 $key->{'use'}, $expire_days); 245 250 } -
Property
svn:keywords
set to
Note: See TracChangeset
for help on using the changeset viewer.