Pārlūkot izejas kodu

use grains.fqdn and localhost

sensu
vmikes pirms 8 gadiem
vecāks
revīzija
5f2c93ccdb
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. +4
    -4
      mongodb/meta/sensu.yml

+ 4
- 4
mongodb/meta/sensu.yml Parādīt failu

@@ -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

Notiek ielāde…
Atcelt
Saglabāt