New version of salt-formula from Saltstack
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.0KB

  1. {%- if pillar.salt is defined %}
  2. {%- if pillar.salt.get('master', {}).get('enabled', False) or pillar.salt.get('minion', {}).get('enabled', False) %}
  3. server:
  4. alert:
  5. {%- if pillar.salt.get('master', {}).get('enabled', False) %}
  6. SaltMasterProcessDown:
  7. if: >-
  8. procstat_running{process_name="salt-master"} == 0
  9. {%- raw %}
  10. labels:
  11. severity: warning
  12. service: salt-master
  13. annotations:
  14. summary: 'Salt-master service is down'
  15. description: 'Salt-master service is down on node {{ $labels.host }}'
  16. {%- endraw %}
  17. {%- endif %}
  18. {%- if pillar.salt.get('minion', {}).get('enabled', False) %}
  19. SaltMinionProcessDown:
  20. if: >-
  21. procstat_running{process_name="salt-minion"} == 0
  22. {%- raw %}
  23. labels:
  24. severity: warning
  25. service: salt-minion
  26. annotations:
  27. summary: 'Salt-minion service is down'
  28. description: 'Salt-minion service is down on node {{ $labels.host }}'
  29. {%- endraw %}
  30. {%- endif %}
  31. {%- endif %}
  32. {%- endif %}