Use management address to get metrics from InfluxDB

With the upgrade to 0.10, InfluxDB is now listening on the
management IP (instead of 0.0.0.0 previously).

Depends-On: I4c28d8da73bd51cb7e558a7a4121fc3220c3344f
Change-Id: I8ee84c1608527709b50312ea009734d6fa41b7b5
This commit is contained in:
Guillaume Thouvenin 2016-02-08 16:58:56 +01:00
parent be85d7ebac
commit fdcfb750eb
2 changed files with 6 additions and 0 deletions

View File

@ -13,6 +13,9 @@
# under the License.
#
prepare_network_config(hiera('network_scheme', {}))
$mgmt_address = get_network_role_property('management', 'ipaddr')
$lma_collector_hash = hiera_hash('lma_collector')
$influxdb_grafana = hiera('influxdb_grafana')
@ -44,6 +47,7 @@ if $lma_collector_hash['influxdb_mode'] != 'disabled' {
class { 'lma_collector::collectd::influxdb':
username => 'root',
password => $influxdb_grafana['influxdb_rootpass'],
address => $mgmt_address,
}
}

View File

@ -15,12 +15,14 @@
class lma_collector::collectd::influxdb (
$username,
$password,
$address,
) {
lma_collector::collectd::python { 'influxdb':
config => {
'Username' => "\"${username}\"",
'Password' => "\"${password}\"",
'Address' => "\"${address}\"",
}
}
}