Saltstack Official MongoDB Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

10 行
456B

  1. {%- from "mongodb/map.jinja" import server with context -%}
  2. {%- if server.bind.address == '0.0.0.0' %}{%- set address = '127.0.0.1' %}{% else %}{%- set address = server.bind.address %}{% endif %}
  3. check:
  4. local_mongodb_mdb_{{ grains.fqdn }}:
  5. command: "PATH=$PATH:/etc/sensu/plugins check_mongodb.py -H {{ address }} -A connect -P {{ server.bind.port }}"
  6. interval: 60
  7. occurrences: 1
  8. subscribers:
  9. - {{ grains['fqdn']|replace('.', '-') }}