# HG changeset patch # User Kim Alvefur # Date 1626431215 -7200 # Node ID 9b253cce7d88cd596994cc745743f7108b9fe934 # Parent b11001bd915d97a0c98813c65428df4dd9b61066 mod_pubsub_alertmanager: Allow configuring template for rendering diff -r b11001bd915d -r 9b253cce7d88 mod_pubsub_alertmanager/mod_pubsub_alertmanager.lua --- a/mod_pubsub_alertmanager/mod_pubsub_alertmanager.lua Thu Jul 01 00:07:27 2021 +0200 +++ b/mod_pubsub_alertmanager/mod_pubsub_alertmanager.lua Fri Jul 16 12:26:55 2021 +0200 @@ -57,7 +57,7 @@ return 202; end -local template = [[ +local template = module:get_option_string("alertmanager_body_template", [[ *ALARM!* Status: {status} Starts at: {startsAt}{endsAt& @@ -66,7 +66,7 @@ {idx}: {item}} Annotations: {annotations% {idx}: {item}} -]] +]]); module:hook("pubsub-summary/urn:uuid:e3bec775-c607-4e9b-9a3f-94de1316d861:v4", function(event) local payload = event.payload;