--- a/mod_http_host_status_check/mod_http_host_status_check.lua Tue Sep 12 15:46:49 2017 +0200
+++ b/mod_http_host_status_check/mod_http_host_status_check.lua Mon Sep 18 16:39:02 2017 +0100
@@ -35,6 +35,7 @@
local current_time = time();
local all_ok = true;
+ local failed_hosts = {};
for host in pairs(hosts) do
local last_heartbeat_time = heartbeats[host];
@@ -81,6 +82,7 @@
if not ok then
all_ok = false;
+ table.insert(failed_hosts, host);
end
if not ok or is_component or last_heartbeat_time then
@@ -95,7 +97,7 @@
end
end
local page = template(status_page_template, {
- status = all_ok and "OK" or "FAIL";
+ status = all_ok and "OK" or ("FAIL: "..table.concat(failed_hosts, ", "));
host_statuses = host_statuses;
});
return page;