alerta / alerta-contrib

Contributed integrations, plugins and custom webhooks
http://alerta.io
MIT License
119 stars 170 forks source link

Using time units ['1s','1m','1h','1d','1w'] for silence in plugin 'prometheus' #400

Open veter2005 opened 8 months ago

veter2005 commented 8 months ago

Prometheus plugin allows to use day unit for setting silence duration, but it's useful to use other units like minutes, hours, and so on.

Replace ALERTMANAGER_SILENCE_DAYS with ALERTMANAGER_SILENCE_PERIOD that can be one of the units ['1s','1m','1h','1d','1w']

veter2005 commented 8 months ago

My version of how it can be done here https://github.com/alerta/alerta-contrib/compare/master...veter2005:alerta-contrib:issues_400

hyberdk commented 8 months ago

if it were me I would keep backwards compatibility, so that if you dont do any day unit, it assumes that its days..