Saltstack Official MongoDB Formula
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

37 linhas
1.0KB

  1. {%- from "mongodb/map.jinja" import server with context %}
  2. {%- if server.get('enabled', False) %}
  3. {%- raw %}
  4. server:
  5. alert:
  6. MongoDBServiceDown:
  7. if: >-
  8. mongodb_up == 0
  9. for: 1m
  10. labels:
  11. severity: minor
  12. service: mongodb
  13. annotations:
  14. summary: "MongoDB service is down"
  15. description: "The MongoDB service on the {{ $labels.host }} node is down for 1 minute."
  16. MongoDBServiceOutage:
  17. if: >-
  18. count(mongodb_up == 0) == count(mongodb_up)
  19. for: 1m
  20. labels:
  21. severity: critical
  22. service: mongodb
  23. annotations:
  24. summary: "MongoDB service outage"
  25. description: "All MongoDB services are down for 1 minute."
  26. MongoDBNoPrimaryMember:
  27. if: >-
  28. absent({__name__=~"mongodb.*",state="PRIMARY"})
  29. for: 1m
  30. labels:
  31. severity: critical
  32. service: mongodb
  33. annotations:
  34. summary: "MongoDB cluster has no primary member"
  35. description: "MongoDB cluster has no primary member for 1 minute."
  36. {%- endraw %}
  37. {%- endif %}