Saltstack Official MongoDB Formula
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

37 lines
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 %}