* add support for new check * use grains.fqdn and localhost * use server.bind.port intead of default * local check * change subscriber to fqdntags/2016.12^0
applications: | applications: | ||||
- mongodb | - mongodb | ||||
classes: | |||||
- service.mongodb.support | |||||
parameters: | parameters: | ||||
_param: | _param: | ||||
mongodb_server_replica_set: default | mongodb_server_replica_set: default |
applications: | applications: | ||||
- mongodb | - mongodb | ||||
classes: | |||||
- service.mongodb.support | |||||
parameters: | parameters: | ||||
mongodb: | mongodb: | ||||
server: | server: |
parameters: | |||||
mongodb: | |||||
_support: | |||||
collectd: | |||||
enabled: false | |||||
heka: | |||||
enabled: false | |||||
sensu: | |||||
enabled: true | |||||
sphinx: | |||||
enabled: false |
{%- from "mongodb/map.jinja" import server with context -%} | |||||
{%- if server.bind.address == '0.0.0.0' %}{%- set address = '127.0.0.1' %}{% else %}{%- set address = server.bind.address %}{% endif %} | |||||
check: | |||||
local_mongodb_mdb_{{ grains.fqdn }}: | |||||
command: "PATH=$PATH:/etc/sensu/plugins check_mongodb.py -H {{ address }} -A connect -P {{ server.bind.port }}" | |||||
interval: 60 | |||||
occurrences: 1 | |||||
subscribers: | |||||
- {{ grains['fqdn']|replace('.', '-') }} |