Is TLS supported for the plugin [[inputs.influxdb_v2_listener]]?

Is TLS supported for the plugin [[inputs.influxdb_v2_listener]] ?

telegraf -config /etc/telegraf/telegraf_infux.conf -test

2023-11-23T11:54:04Z I! Loading config: /etc/telegraf/telegraf_infux.conf
2023-11-23T11:54:04Z E! error loading config file /etc/telegraf/telegraf_infux.conf: plugin inputs.influxdb_v2_listener: line 23: configuration specified the fields [“tls-key” “tls-cert”], but they weren’t used

======/etc/telegraf/telegraf_infux.conf============

[global_tags]
[agent]
interval = “1m”
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 75000
collection_jitter = “0s”
flush_interval = “10s”
flush_jitter = “0s”
precision = “”
hostname = “”
omit_hostname = false
debug = true
quiet = false
logtarget = “file”
logfile = “/etc/telegraf/logs/telegraf_listener.log”
logfile_rotation_max_size = “10MB”
logfile_rotation_max_archives = 2
[[inputs.influxdb_v2_listener]]
service_address = “:8087”
data_format = “influx”
bucket_tag = “Harvest”
token = “”
parser_type = “upstream”
[[outputs.influxdb_v2]]
urls = [“https://server1.corp.com”]
token = “”
organization = “ORG”
bucket = “Harvest”
insecure_skip_verify = true
[[outputs.influxdb_v2]]
urls = [“http://<IP_address>:8086”]
token = “”
organization = “ORG”
bucket = “Harvest”
insecure_skip_verify = true

I think you’ve got hyphens there in the config field names. Docs indicate they are underscores

tls_key and tls_cert

More info here

Thanks for your help. After changed the hyphens to underscores, it works.

1 Like

Good stuff , glad it worked