Browse Source

Add salt-master and salt-minion alerts

Change-Id: I1407f89306b192ace13752f1fbc0a8594310aead
pull/59/merge
Bartosz Kupidura 7 years ago
parent
commit
77bef8d06c
2 changed files with 34 additions and 0 deletions
  1. +2
    -0
      metadata/service/support.yml
  2. +32
    -0
      salt/meta/prometheus.yml

+ 2
- 0
metadata/service/support.yml View File

_support: _support:
telegraf: telegraf:
enabled: true enabled: true
prometheus:
enabled: true
collectd: collectd:
enabled: false enabled: false
heka: heka:

+ 32
- 0
salt/meta/prometheus.yml View File

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

Loading…
Cancel
Save