New version of salt-formula from Saltstack
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

prometheus.yml 1.0KB

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