# HG changeset patch # User Matthew Wild # Date 1505749142 -3600 # Node ID 85cf9a8b4020b224cc45db5f3ded23dfde79fbe2 # Parent 1872a9129c2f8b74bbad1c54a0183d4e65d68984 mod_http_host_status_check: Add list of failing hosts to the first line for summary diff -r 1872a9129c2f -r 85cf9a8b4020 mod_http_host_status_check/mod_http_host_status_check.lua --- 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;