瀏覽代碼

add support for new check (#2)

* add support for new check

* use grains.fqdn and localhost

* use server.bind.port intead of default

* local check

* change subscriber to fqdn
tags/2016.12^0
Misak 8 年之前
父節點
當前提交
3365e58a17
共有 4 個文件被更改,包括 24 次插入0 次删除
  1. +2
    -0
      metadata/service/server/cluster.yml
  2. +2
    -0
      metadata/service/server/single.yml
  3. +11
    -0
      metadata/service/support.yml
  4. +9
    -0
      mongodb/meta/sensu.yml

+ 2
- 0
metadata/service/server/cluster.yml 查看文件

@@ -1,5 +1,7 @@
applications:
- mongodb
classes:
- service.mongodb.support
parameters:
_param:
mongodb_server_replica_set: default

+ 2
- 0
metadata/service/server/single.yml 查看文件

@@ -1,5 +1,7 @@
applications:
- mongodb
classes:
- service.mongodb.support
parameters:
mongodb:
server:

+ 11
- 0
metadata/service/support.yml 查看文件

@@ -0,0 +1,11 @@
parameters:
mongodb:
_support:
collectd:
enabled: false
heka:
enabled: false
sensu:
enabled: true
sphinx:
enabled: false

+ 9
- 0
mongodb/meta/sensu.yml 查看文件

@@ -0,0 +1,9 @@
{%- 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('.', '-') }}

Loading…
取消
儲存