Ver código fonte

use grains.fqdn and localhost

sensu
vmikes 8 anos atrás
pai
commit
5f2c93ccdb
1 arquivos alterados com 4 adições e 4 exclusões
  1. +4
    -4
      mongodb/meta/sensu.yml

+ 4
- 4
mongodb/meta/sensu.yml Ver arquivo

@@ -1,9 +1,9 @@
{%- from "linux/map.jinja" import network with context -%}
{%- if grains.ipv4[0] == '127.0.0.1' %}{%- set address = grains.ipv4[1] %}{% else %}{%- set address = grains.ipv4[0] %}{% endif %}
{%- 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:
remote_mongodb_mdb_{{ network.fqdn }}:
remote_mongodb_mdb_{{ grains.fqdn }}:
command: "PATH=$PATH:/etc/sensu/plugins check_mongodb.py -H {{ address }} -A connect -P 27017"
interval: 60
occurrences: 1
subscribers:
- local-mongodb-server
- local-mongodb-server

Carregando…
Cancelar
Salvar