Saltstack Official MongoDB Formula
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

prometheus.yml 1.0KB

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