Skip to content

Commit

Permalink
Add http response code to check.php
Browse files Browse the repository at this point in the history
  • Loading branch information
RoseECooper committed Nov 29, 2023
1 parent 7bc3b3f commit 58240b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htdocs/web_portal/GOCDB_monitor/check.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

$errorCount = run_tests($message);

if ($errorCount != 0) {
if ($errorCount =! 0) {
echo("One or more errors have been detected while checking GOCDB services - " .
$message .
". See https://goc.egi.eu/portal/GOCDB_monitor/ to find out more\n");
http_response_code(500);
exit(2); // return Nagios error code for CRITICAL
}

Expand Down

0 comments on commit 58240b4

Please sign in to comment.