Skip to content

inputs.socket_listener TCP + TLS #5448

@Ra-fiki

Description

@Ra-fiki

Relevant telegraf.conf:

[global_tags]
 
[agent]
  interval = "10s"
  round_interval = true

  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"

  flush_interval = "10s"
  flush_jitter = "0s"
  precision = ""

  debug = false
  quiet = false
  logfile = ""

  hostname = ""
  omit_hostname = false

[[outputs.influxdb]]
   urls = ["http://127.0.0.1:8086"]

   database = "serwery"

   username = "user"
   password = "pass"

[[inputs.cpu]]
  percpu = true
  totalcpu = true
  collect_cpu_time = false
  report_active = false

[[inputs.disk]]
  ignore_fs = ["tmpfs", "devtmpfs", "devfs", "overlay", "aufs", "squashfs"]

[[inputs.diskio]]

[[inputs.kernel]]

[[inputs.mem]]

[[inputs.processes]]

[[inputs.swap]]

[[inputs.system]]

 [[inputs.socket_listener]]
    service_address = "tcp://:8094"
    max_connections = 1024
    read_timeout = "30s"
    tls_cert = "/etc/pki/server-cert.pem"
    tls_key  = "/etc/pki/server-key.pem"
    tls_allowed_cacerts = ["/etc/pki/ca.pem"]
    data_format = "influx"

System info:

Telegraf 1.9.0
4.9.0-3-amd64 Debian 4.9.30-2+deb9u5

Steps to reproduce:

  1. Put in /etc/pki/ files: ca.pem , cert.pem , key.pem (self signed certificate)
  2. Set input.socket_listener section in telegraf.conf
  3. Restart telegraf

Expected behavior:

Information that listening on tcp:8094 is set or if not a error message why

Actual behavior:

There will be no information that something is listening on port 8094 and if checked with netstat -tpl nothing with that port will be presented

###Additional info
When I set socket_listener without tls options it work and is presented in netstat -tpl

Metadata

Metadata

Assignees

Labels

bugunexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions