salt-formulas / salt-formula-sensu

Other
8 stars 10 forks source link

Sensu client to be configured with IP from specific interface #4

Open epcim opened 7 years ago

epcim commented 7 years ago

Sensu client should be forced to be configured with IP from specific interface (ie: eth0). In the example below is the IP changed once new interface was added. Other example, If node has keepalived, once the VIP address is on the node and salt-call is run, the VIP might, or actually is, pick-up as client address.

[INFO    ] Executing state file.managed for /etc/sensu/conf.d/client.json
[INFO    ] Fetching file from saltenv 'base', ** skipped ** latest already in cache u'salt://sensu/files/client.json'
[INFO    ] Fetching file from saltenv 'base', ** skipped ** latest already in cache u'salt://linux/map.jinja'
[INFO    ] Fetching file from saltenv 'base', ** skipped ** latest already in cache u'salt://sensu/map.jinja'
[INFO    ] File changed:
--- 
+++ 
@@ -5,7 +5,7 @@
     "fqdn": "ctl01.os1.xxx.local",
     "cluster": "default",
     "graphite_name": "ctl01_os1_xxx_local",
-    "address": "10.200.50.21",
+    "address": "10.1.35.21",
     "keepalive": {
       "thresholds": {