Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'enable_tls' is not defined in jti_openconfig_telemetry.OpenConfigTelemetry #6148

Closed
mohsin106 opened this issue Jul 22, 2019 · 1 comment
Closed
Assignees
Labels
bug unexpected problem or unintended behavior

Comments

@mohsin106
Copy link

Relevant telegraf.conf:

[global_tags]

[agent]
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "5s"
  flush_jitter = "0s"
  debug = false
  quiet = false
  hostname = "sensor-agent"
  omit_hostname = false

[[inputs.jti_openconfig_telemetry]]
  servers = ["our.router.net:50051"]
  sample_frequency = "60000ms"
  username = "user"
  password = "pass"
  client_id = "sensor-agent"
  
  sensors = [
   "interfaces /junos/system/linecard/interface/",
   "ifaceDesc /interfaces/interface/state/description/",
   "lsps /junos/services/label-switched-path/usage/",
   "cpu /junos/system/linecard/cpu/memory/",
   "npu /junos/system/linecard/npu/memory/",
  ]

  enable_tls = true
  #ssl_cert = "/etc/telegraf/juniper_tls_cert.pem"
  insecure_skip_verify = true

  str_as_tags = false

  [[outputs.influxdb]]
  urls = ["http://localhost:8086"         ]
  database = "telemetry_juniper_sensors" # required
  precision = "s"
  write_consistency = "any"
  timeout = "5s"

System info:

Docker container running Telegraf v1.11

Steps to reproduce:

  1. Put 'enable_tls = true' statement in the telegraf.conf file.
  2. Start Telegraf Docker container.
  3. Error is shown in the logs.

Expected behavior:

Telegraf should start streaming data into my InfluxDB.

Actual behavior:

Seeing the following error message:

Error running agent: Error parsing /etc/telegraf/telegraf.conf, line 31: field corresponding to `enable_tls' is not defined in jti_openconfig_telemetry.OpenConfigTelemetry

Additional info:

If I delete the 'enable_tls = true' line and uncomment "#ssl_cert = "/etc/telegraf/juniper_tls_cert.pem" then everything works. The cert is loaded on the router.
I want to be able to set up a TLS session without providing the pem file in my Telegraf.conf file. I believe if I have the 'insecure_skip_verify = true' line in my telegraf.conf file this should allow me to set up a TLS encrypted session, but currently, it is failing before it even reads the 'insecure_skip_verify=true' line.

@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Jul 22, 2019
@glinton
Copy link
Contributor

glinton commented Jul 22, 2019

If you wish to use this feature, please use a nightly build, as it hasn't made it to an official release yet. (Implemented in #6027 that will be in telegraf 1.12)

@glinton glinton closed this as completed Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants