diff --git a/global/overlay/etc/puppet/modules/eid/manifests/telegraf2.pp b/global/overlay/etc/puppet/modules/eid/manifests/telegraf2.pp index 6d1a4886..90105c12 100644 --- a/global/overlay/etc/puppet/modules/eid/manifests/telegraf2.pp +++ b/global/overlay/etc/puppet/modules/eid/manifests/telegraf2.pp @@ -10,15 +10,16 @@ # @param influxdb2_bucket Influx bucket name (referenced in compose file) # @param influxdb2_bucket_proxy Influx bucket name (referenced in compose file) class eid::telegraf2 ( + Enum['proxy', 'log'] $server_type, String $version = 'latest', String $server_fqdn = $facts['networking']['fqdn'], - Enum['proxy', 'log'] $server_type, Array $ports = [], String $service_dir = '/etc/telegraf', Array $influx_urls = ["https://metrics-external-1.sunet.se:8086"], String $influxdb2_org = 'SwedenConnect', String $influxdb2_bucket = 'eidas', String $influxdb2_bucket_proxy = 'eidas-proxy', + Boolean $use_fticks = false, ) { # Get influx password token from eyaml diff --git a/global/overlay/etc/puppet/modules/eid/templates/telegraf2/telegraf.conf.erb b/global/overlay/etc/puppet/modules/eid/templates/telegraf2/telegraf.conf.erb index fcaaa822..b6e56a19 100644 --- a/global/overlay/etc/puppet/modules/eid/templates/telegraf2/telegraf.conf.erb +++ b/global/overlay/etc/puppet/modules/eid/templates/telegraf2/telegraf.conf.erb @@ -14,7 +14,7 @@ omit_hostname = false [[inputs.system]] -<% if @server_type == 'log' -%> +<% if @use_fticks -%> [[inputs.http_listener_v2]] service_address = "0.0.0.0:9999" methods = ["POST"] @@ -23,6 +23,8 @@ json_time_key = "ts" json_time_format = "2006-01-02 15:04:05" json_timezone = "Local" +<% end -%> +<% if @server_type == 'log' -%> [[inputs.tail]] files = ["/var/log/eidas_stats.log"] data_format = "json"