Skip to content

Commit

Permalink
check_apache-auto.pl - critical when Apache is not running
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Pulec <[email protected]>
  • Loading branch information
Pavel Pulec committed Oct 16, 2018
1 parent bed8439 commit 37505bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Nagios plugin version

check_apache-auto.pl 1.0
check_apache-auto.pl 1.1
check_bacula 0.0.5
check_collective-access.rb 1.1
check_crm 0.7
Expand Down
5 changes: 5 additions & 0 deletions check_apache-auto.pl
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ ($)
$htmlbrut = $ua->request($req)->as_string ;
$htmlbrut=~ s/ //g;

if (substr($htmlbrut, 0, 3) eq '500') {
print "CRITICAL: Can't connect to Apache, return code: 500\n";
exit 2;
}

# Formatting of the data table
@recolte = split(/\n/,$htmlbrut);
splice (@recolte, 0, $topnbr);
Expand Down

0 comments on commit 37505bc

Please sign in to comment.