This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Description
Hey!
I am currently trying to implement proper links to our kibana dashboards in our alerting messages for our devs, so they dont have to look up the alerts themselves.
One problem I am facing so far is the following:
- We have monitors that check e.g. every 5 minutes for all Warnings that popped up in the last 30 minutes. If I am using
ctx.periodStart
and ctx.PeriodEnd
this is just set to the 5 minute interval.
Is there any other way to circumvent this? To my knowledge e.g. mustache does not support date operations in the message templating, as I would otherwise just set the start time to ctx.PeriodEnd - 30m
?
- For monitors that are triggered via schedules and not periods, I don't find any way to actually reference the timeframe for those monitors in my message template as periodStart and end will not reflect a monitor that is e.g. triggered once a day.
I would be really glad to any advice on how to still do this or someone pointing me into a direction where I could create a PR here.