changeset 4626:285efde5e8a5

mod_pubsub_alertmanager: Exclude "ends at" timestamp for unresolved alerts Wow, does the problem end in year 1? Let me get my time machine!
author Kim Alvefur <zash@zash.se>
date Sun, 18 Jul 2021 00:19:50 +0200
parents f7e26c43a9bc
children adda872fa9e1
files mod_pubsub_alertmanager/mod_pubsub_alertmanager.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_alertmanager/mod_pubsub_alertmanager.lua	Fri Jul 16 17:35:28 2021 +0200
+++ b/mod_pubsub_alertmanager/mod_pubsub_alertmanager.lua	Sun Jul 18 00:19:50 2021 +0200
@@ -47,7 +47,7 @@
 			item:text_tag("label", v, { name=k });
 		end
 		item:tag("starts", { at = alert.startsAt}):up();
-		if alert.endsAt then
+		if alert.endsAt and alert.status == "resolved" then
 			item:tag("ends", { at = alert.endsAt }):up();
 		end
 		if alert.generatorURL then