From da72f062bbfdabaafece6c466df222a23e70b7c6 Mon Sep 17 00:00:00 2001 From: Niklas Yann Wettengel Date: Sun, 22 Jul 2018 13:14:46 +0200 Subject: updated influx-scripts --- roles/install_monitoring/templates/ffmyk-influx/fastd.php.j2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'roles/install_monitoring/templates/ffmyk-influx/fastd.php.j2') diff --git a/roles/install_monitoring/templates/ffmyk-influx/fastd.php.j2 b/roles/install_monitoring/templates/ffmyk-influx/fastd.php.j2 index 985d7d3..0cd05c3 100644 --- a/roles/install_monitoring/templates/ffmyk-influx/fastd.php.j2 +++ b/roles/install_monitoring/templates/ffmyk-influx/fastd.php.j2 @@ -26,9 +26,13 @@ function fastdGetPeers($file) { return $peers; } -$fastd_1280 = fastdGetPeers('/run/ffmyk.socket'); +$data = ""; -$data = 'fastdclient,mtu=1280,host={{ ansible_hostname }},type=backend value='.$fastd_1280."\n"; +{% for site in sites %} +$fastd_{{ site.name }} = fastdGetPeers('/run/ff{{ site.name }}1.socket'); +$data .= 'fastdclient,mtu=1280,host={{ ansible_hostname }},site={{ site.name }},type=backend value='.$fastd_{{ site.name }}."\n"; + +{% endfor %} sendflux($data); -- cgit v1.2.3-54-g00ecf