Improving alert support
This commit is contained in:
parent
b95d0894d9
commit
5ab3f20789
|
@ -122,7 +122,8 @@
|
|||
<separator name='prometheusJobName'>Configuration du serveur Prometheus</separator>
|
||||
<separator name='alSMTPHost'>Configuration SMTP pour l'envois des alertes</separator>
|
||||
<separator name='alDefaultReceiver'>Destinatires</separator>
|
||||
<separator name='alRoute'>Rêgles de distribution</separator>
|
||||
<separator name='alRoute'>Rêgles de distribution simples</separator>
|
||||
<separator name='alRouteRegxp'>Rêgles de distribution regexp</separator>
|
||||
<separator name='alSubRoute'>Sous-rêgles de distribution</separator>
|
||||
</separators>
|
||||
|
||||
|
@ -165,6 +166,12 @@
|
|||
<param>['Node Exporter','Port']</param>
|
||||
</check>
|
||||
|
||||
<condition name='disabled_if_in' source='alSMTPAuth'>
|
||||
<param>non</param>
|
||||
<target type='variable'>alSMTPUser</target>
|
||||
<target type='variable'>alSMTPPass</target>
|
||||
</condition>
|
||||
|
||||
<condition name='disabled_if_in' source='activer_prometheus'>
|
||||
<param>non</param>
|
||||
<target type='family'>prometheus</target>
|
||||
|
@ -172,6 +179,7 @@
|
|||
<target type='filelist'>prometheus</target>
|
||||
<target type='variable'>activer_grafana</target>
|
||||
</condition>
|
||||
|
||||
<condition name='disabled_if_in' source='activer_grafana'>
|
||||
<param>non</param>
|
||||
<target type='family'>grafana</target>
|
||||
|
|
|
@ -51,7 +51,7 @@ route:
|
|||
- match_re:
|
||||
%%{route.alRouteMatchRegExpSource}: %%{route.alRouteMatchRegExp}
|
||||
receiver: %%route.alRouteMatchRegxpRecv
|
||||
%if not is_empty('alSubRoute')
|
||||
%if not %%is_empty('alSubRoute')
|
||||
routes:
|
||||
%for sroute in %%getVar('alSubRoute',[])
|
||||
# The service has a sub-route for critical alerts, any alerts
|
||||
|
@ -70,7 +70,7 @@ route:
|
|||
%%{rt.alRouteMatchSource}: %%{rt.alRouteMatchValue}
|
||||
receiver: %%rt.alRouteMatchReceiver
|
||||
|
||||
%if not is_empty('alSubRoute')
|
||||
%if not %%is_empty('alSubRoute')
|
||||
routes:
|
||||
%for sroute in %%getVar('alSubRoute',[])
|
||||
%if %%sroute == %%rt
|
||||
|
|
Loading…
Reference in New Issue