Ver código fonte

Add salt-master and salt-minion alerts

Change-Id: I1407f89306b192ace13752f1fbc0a8594310aead
pull/59/merge
Bartosz Kupidura 7 anos atrás
pai
commit
77bef8d06c
2 arquivos alterados com 34 adições e 0 exclusões
  1. +2
    -0
      metadata/service/support.yml
  2. +32
    -0
      salt/meta/prometheus.yml

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

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

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

@@ -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 %}

Carregando…
Cancelar
Salvar