From 58240b4639c920b90a7d681cc3a7a6c7766b7d50 Mon Sep 17 00:00:00 2001 From: Rose Cooper Date: Wed, 29 Nov 2023 16:06:07 +0000 Subject: [PATCH] Add http response code to check.php --- htdocs/web_portal/GOCDB_monitor/check.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/web_portal/GOCDB_monitor/check.php b/htdocs/web_portal/GOCDB_monitor/check.php index 638b4af1f..45d07b847 100644 --- a/htdocs/web_portal/GOCDB_monitor/check.php +++ b/htdocs/web_portal/GOCDB_monitor/check.php @@ -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 }