New version of salt-formula from Saltstack
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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. {%- raw %}
  7. SaltMasterServiceDown:
  8. if: >-
  9. procstat_running{process_name="salt-master"} == 0
  10. labels:
  11. severity: critical
  12. service: salt
  13. annotations:
  14. summary: "Salt-master service is down"
  15. description: "The salt-master service on the {{ $labels.host }} node is down."
  16. {%- endraw %}
  17. {%- endif %}
  18. {%- if pillar.salt.get('minion', {}).get('enabled', False) %}
  19. {%- raw %}
  20. SaltMinionServiceDown:
  21. if: >-
  22. procstat_running{process_name="salt-minion"} == 0
  23. labels:
  24. severity: critical
  25. service: salt
  26. annotations:
  27. summary: "Salt-minion service is down"
  28. description: "The salt-minion service on the {{ $labels.host }} node is down."
  29. {%- endraw %}
  30. {%- endif %}
  31. {%- endif %}
  32. {%- endif %}