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

Telegraf doesnt fully reload configuration upon file addition/deletion #15210

Closed
Andrene opened this issue Apr 23, 2024 · 2 comments
Closed

Telegraf doesnt fully reload configuration upon file addition/deletion #15210

Andrene opened this issue Apr 23, 2024 · 2 comments
Labels
bug unexpected problem or unintended behavior

Comments

@Andrene
Copy link

Andrene commented Apr 23, 2024

Relevant telegraf.conf

[global_tags]
  # dc = "us-east-1" # will tag all metrics with dc=us-east-1
  # rack = "1a"
  ## Environment variables can be used as tags, and throughout the config file
  # user = "$USER"

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

  metric_batch_size = 10000

  metric_buffer_limit = 100000

  collection_jitter = "0s"

  flush_interval = "10s"

  flush_jitter = "0s"

  precision = "0s"

  ## Override default hostname, if empty use os.Hostname()
  hostname = ""
  ## If set to true, do no set the "host" tag in the telegraf agent.
  omit_hostname = false

Logs from Telegraf

2024-04-23T01:44:40Z E! [inputs.gnmi] Error in plugin: failed to setup subscription: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp x.x.x.x:x: i/o timeout"
2024-04-23T01:44:47Z W! Config file deleted
2024-04-23T01:45:10Z E! [inputs.gnmi] Error in plugin: failed to setup subscription: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp x.x.x.x:x: i/o timeout"

System info

Telegraf 1.30.1, RHEL 9

Docker

No response

Steps to reproduce

  1. Launch telegraf telegraf --watch-config poll --config-directory /home/user/telegraf.conf.d/
  2. Add and or delete a input file from /home/user/telegraf.conf.d/, I was testing with gnmi
  3. Notice that it hasnt reached out to the new host, nor has it stopped trying to reachout to an old host

Expected behavior

If a config file is added to the watched directory then it's loaded and the device is polled
If a config file is deleted from the watched directory then its removed and the device is no longer polled

Actual behavior

If a config file is added to the watched directory nothing is logged and the config file isnt loaded and the device isnt polled
If a config file is deleted the 2024-04-23T01:44:47Z W! Config file deleted is logged and the config remains loaded and the device is continued to be polled

Additional info

No response

@Andrene Andrene added the bug unexpected problem or unintended behavior label Apr 23, 2024
@powersj
Copy link
Contributor

powersj commented Apr 23, 2024

dup of #12389

@powersj powersj closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2024
@Hipska
Copy link
Contributor

Hipska commented Sep 10, 2024

@Andrene v1.32.0 might solve your issue (at least for adding files) See #15645

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