Explorar el Código

Add salt-master and salt-minion alerts

Change-Id: I1407f89306b192ace13752f1fbc0a8594310aead
pull/59/merge
Bartosz Kupidura hace 7 años
padre
commit
77bef8d06c
Se han modificado 2 ficheros con 34 adiciones y 0 borrados
  1. +2
    -0
      metadata/service/support.yml
  2. +32
    -0
      salt/meta/prometheus.yml

+ 2
- 0
metadata/service/support.yml Ver fichero

@@ -5,6 +5,8 @@ parameters:
_support:
telegraf:
enabled: true
prometheus:
enabled: true
collectd:
enabled: false
heka:

+ 32
- 0
salt/meta/prometheus.yml Ver fichero

@@ -0,0 +1,32 @@
{%- if pillar.salt is defined %}
{%- if pillar.salt.get('master', {}).get('enabled', False) or pillar.salt.get('minion', {}).get('enabled', False) %}
server:
alert:
{%- if pillar.salt.get('master', {}).get('enabled', False) %}
SaltMasterProcessDown:
if: >-
procstat_running{process_name="salt-master"} == 0
{%- raw %}
labels:
severity: warning
service: salt-master
annotations:
summary: 'Salt-master service is down'
description: 'Salt-master service is down on node {{ $labels.host }}'
{%- endraw %}
{%- endif %}
{%- if pillar.salt.get('minion', {}).get('enabled', False) %}
SaltMinionProcessDown:
if: >-
procstat_running{process_name="salt-minion"} == 0
{%- raw %}
labels:
severity: warning
service: salt-minion
annotations:
summary: 'Salt-minion service is down'
description: 'Salt-minion service is down on node {{ $labels.host }}'
{%- endraw %}
{%- endif %}
{%- endif %}
{%- endif %}

Cargando…
Cancelar
Guardar