diff --git a/global/overlay/etc/puppet/modules/eid/manifests/telegraf2.pp b/global/overlay/etc/puppet/modules/eid/manifests/telegraf2.pp index afd5fbcf..46b69710 100644 --- a/global/overlay/etc/puppet/modules/eid/manifests/telegraf2.pp +++ b/global/overlay/etc/puppet/modules/eid/manifests/telegraf2.pp @@ -4,11 +4,13 @@ # @param server_fqdn The FQDN of the server. (referenced in compose file) # @param ports Port mappings for container # @param service_dir The directory where all related config and files are stored. (referenced in compose file) +# @param influx_urls List of influxdb urls to send data to class eid::telegraf2 ( String $version = 'latest', String $server_fqdn = $facts['networking']['fqdn'], Array $ports = [], String $service_dir = '/etc/telegraf', + Array $influx_urls = ["https://metrics-external-1.sunet.se:8086"], ) { # Get influx values diff --git a/global/overlay/etc/puppet/modules/eid/templates/telegraf2/95-telegraf.conf.erb b/global/overlay/etc/puppet/modules/eid/templates/telegraf2/95-telegraf.conf.erb index 314cf9b0..41579022 100644 --- a/global/overlay/etc/puppet/modules/eid/templates/telegraf2/95-telegraf.conf.erb +++ b/global/overlay/etc/puppet/modules/eid/templates/telegraf2/95-telegraf.conf.erb @@ -1,5 +1,5 @@ [[outputs.influxdb_v2]] - urls = ["https://metrics-external-1.sunet.se:8086"] + urls = [<%= @influxdb2_urls %>] token = <%= @influxdb2_token %> organization = <%= @influxdb2_org %> bucket = <%= @influxdb2_bucket %> @@ -7,7 +7,7 @@ [outputs.influxdb_v2.tagdrop] influxdb_database = ["*"] [[outputs.influxdb_v2]] - urls = ["https://metrics-external-1.sunet.se:8086"] + urls = [<%= @influx_urls %>] token = <%= @influxdb2_token %> organization = <%= @influxdb2_org %> bucket = <%= @influxdb2_bucket %>