Giter Club home page Giter Club logo

Comments (4)

fireba11 avatar fireba11 commented on July 26, 2024

I think i had this back in 1.26 as issue but i can't find it anymore. At least current 1.31 ignores hostname, running tests for other versions now.

from telegraf.

powersj avatar powersj commented on July 26, 2024

At least current 1.31 ignores hostname

Using this config:

[agent]
  debug = true
  hostname = "foobar"
  omit_hostname = false

[[outputs.file]]

[[inputs.exec]]
  commands = ["echo metric value=42"]
  data_format = "influx"

Produces:

❯ ./telegraf --config config.toml --once
2024-07-08T12:56:02Z I! Loading config: config.toml
2024-07-08T12:56:02Z I! Starting Telegraf 1.32.0-94e45a1e brought to you by InfluxData the makers of InfluxDB
2024-07-08T12:56:02Z I! Available plugins: 234 inputs, 9 aggregators, 32 processors, 26 parsers, 60 outputs, 6 secret-stores
2024-07-08T12:56:02Z I! Loaded inputs: exec
2024-07-08T12:56:02Z I! Loaded aggregators: 
2024-07-08T12:56:02Z I! Loaded processors: 
2024-07-08T12:56:02Z I! Loaded secretstores: 
2024-07-08T12:56:02Z I! Loaded outputs: file
2024-07-08T12:56:02Z I! Tags enabled: host=foobar
2024-07-08T12:56:02Z D! [agent] Initializing plugins
2024-07-08T12:56:02Z D! [agent] Connecting outputs
2024-07-08T12:56:02Z D! [agent] Attempting connection to [outputs.file]
2024-07-08T12:56:02Z D! [agent] Successfully connected to outputs.file
2024-07-08T12:56:02Z D! [agent] Starting service inputs
2024-07-08T12:56:02Z D! [agent] Stopping service inputs
2024-07-08T12:56:02Z D! [agent] Input channel closed
2024-07-08T12:56:02Z I! [agent] Hang on, flushing any cached metrics before shutdown
metric,host=foobar value=42 1720443362000000000
2024-07-08T12:56:02Z D! [outputs.file]  Wrote batch of 1 metrics in 19.76µs
2024-07-08T12:56:02Z D! [outputs.file]  Buffer fullness: 0 / 10000 metrics
2024-07-08T12:56:02Z I! [agent] Stopping running outputs
2024-07-08T12:56:02Z D! [agent] Stopped Successfully

We would need a way to reproduce.

from telegraf.

powersj avatar powersj commented on July 26, 2024

After the team and I chatted, we noticed you only provided the two config options. Can you provide your whole config? Do you have multiple agent config sections?

I still find it highly unlikely that this option was broken since 1.25, as that would be more than a year and we have people using this.

from telegraf.

telegraf-tiger avatar telegraf-tiger commented on July 26, 2024

Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Forums or provide additional details in this issue and reqeust that it be re-opened. Thank you!

from telegraf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.