-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 should be able to report its version #5958
Comments
It could be achieved with a tag, that is "hard-coded" in the configuration (that would obviously be a tag, and that feels wrong - it would depend on the configuration that may not be changed when upgrading the telegraf). One could also implement it with an exec plugin, parsing the output from telegraf --version... argh... This would fit nicely in the [[inputs.internal]] ? |
Yeah, I'm thinking we add it as a tag to the
Probably the best way to get this info today for most is by looking at the User-Agent header from the InfluxDB output. |
@danielnelson Can we add a flag for this one inside the config?
|
It would be preferred to have the version as a fieldvalue, that way one can compare... |
Are you trying to report on this? If so, get a CMDB tool to do that. If you want to show internal metrics for telegraf and group by the version, then the tag makes perfect sense |
I wasn't thinking to add a flag, usually I only add one if it will reduce the collection time significantly. If you want to exclude it then you could just use
This would be nice, especially if it could handle semantic versions correctly. I don't think we can even do lexical string comparisons with InfluxQL, but you can use a regular expression with a tag:
|
Afaik, the (so called) "regular expression" do expand the expression to a list of possible combinations and is de facto a version = 7.0 OR version = 7.0.1 OR and so forth. And one have to select fieldvalues, but I don't need any of the other fieldvalues to determine which versions are out their (if version is a tag, one can't do "SELECT version FROM internal_agent") And yes, we do use CMDB that tells us the most, but there are still too many corner cases... But now the developers has got my input, and I don't feel like starting a flame war here, so I let them decide and will be happy with a tag if that is what they think is best. happy debugging ;-) |
I wrote a plug-in that simply exports the version to an ENV on startup...then sends influx this info as a tag...only on startup (not per collection interval). This way you can see when the agent was started, and it’s version. Also wasn’t sure that my ‘solution’ was acceptable. If you think it is worth it, I can open a PR for this? |
@nicgrobler Sure, would be helpful to take a look at. I do think if we go the route of having Telegraf report state change events we should probably add a few more events like reload and shutdown and possible some addition information. We should probably think a bit more about what that might look like. |
Hi Nisely and all, How can I get the telegraf version Number from our existing domain servers where telegraf already installed..? can you please provide a quick solution here. |
Some configuration like this:
or |
Can I have the perfect configuration file to get the telegraf version ?
From: Poul H. Sørensen <[email protected]>
Sent: Friday, December 18, 2020 9:32 PM
To: influxdata/telegraf <[email protected]>
Cc: Chandra Sekhar Mortha <[email protected]>; Comment <[email protected]>
Subject: Re: [influxdata/telegraf] telegraf should be able to report its version (#5958)
Some configuration like this:
[[inputs.internal]]
## If true, collect telegraf memory stats.
collect_memstats = true
interval = "120s"
or telegraf --version
should do the trick.
I think the configuration is supoorted from telegraf >= 1.12
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/influxdata/telegraf/issues/5958*issuecomment-748174994__;Iw!!PBKjc0U4!a12LehRGY7svci3QegN_RtTPT2dD4Enxk-m07lmzTaeu27tUyuD_2bLXhhICBS1SdgifVvUU$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ASFPD7GBORG6ROFVCMLGX5TSVN4IXANCNFSM4HT523DA__;!!PBKjc0U4!a12LehRGY7svci3QegN_RtTPT2dD4Enxk-m07lmzTaeu27tUyuD_2bLXhhICBS1SdnK-H5k4$>.
|
Well, your perfect may differ from my perfect (mine may even differ between the servers I configure...)
|
Thanks, please don’t mine…I am new to this telegraf
can you please explain the process and where to change the config file to hard code and get the versions list..?
How to modify the below configuration file w.r.to the telegraf version ?
## If true, collect telegraf memory stats.
collect_memstats = true
interval = "120s"
Also, please let me know if there is any easy way to get the telegraf version list for entire domain.
From: Poul H. Sørensen <[email protected]>
Sent: Friday, December 18, 2020 9:57 PM
To: influxdata/telegraf <[email protected]>
Cc: Chandra Sekhar Mortha <[email protected]>; Comment <[email protected]>
Subject: Re: [influxdata/telegraf] telegraf should be able to report its version (#5958)
Can I have the perfect configuration file to get the telegraf version ?
Well, your perfect may differ from my perfect (mine may even differ between the servers I configure...)
But iin my perfect world, we use: /etc/telegraf/telegraf.d/inputs_internal.cfg which telegraf includes:
## If true, collect telegraf memory stats.
collect_memstats = true
interval = "120s"
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/influxdata/telegraf/issues/5958*issuecomment-748188526__;Iw!!PBKjc0U4!eWMeh_rzcjLFImcwogTGQ8T1V6sxOgS92VSFxhQd_Bp8oJgB-ZDDQ3-gEfqP5wgMlP0eHB2K$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ASFPD7FKCR2MMBMURMUHVEDSVN7HDANCNFSM4HT523DA__;!!PBKjc0U4!eWMeh_rzcjLFImcwogTGQ8T1V6sxOgS92VSFxhQd_Bp8oJgB-ZDDQ3-gEfqP5wgMlDT6eGCO$>.
|
https://docs.influxdata.com/telegraf/v1.16/ to get a better understanding of telegraf |
OK, then you can tell me where you have your telegraf configuration from your existing domain servers where telegraf is already installed. Or just login to all the servers and issue |
To enable the input plugin
and change them to:
yes, that was "remove the |
Hi
I am receiving the below error while running telegraf --version
[cid:[email protected]]
Also, is the below for memory stats or to get an version.?
[[inputs.internal]]
# ## If true, collect telegraf memory stats.
# # collect_memstats = true
yes, that was "remove the # comment"
From: Poul H. Sørensen <[email protected]>
Sent: Friday, December 18, 2020 10:53 PM
To: influxdata/telegraf <[email protected]>
Cc: Chandra Sekhar Mortha <[email protected]>; Comment <[email protected]>
Subject: Re: [influxdata/telegraf] telegraf should be able to report its version (#5958)
To enable the input plugin internal
find the lines ```# # Collect statistics about itself
[[inputs.internal]]
## If true, collect telegraf memory stats.
# collect_memstats = true
and change them to:
```# # Collect statistics about itself
[[inputs.internal]]
# ## If true, collect telegraf memory stats.
# # collect_memstats = true
yes, that was "remove the # comment"
and restart telegraf
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/influxdata/telegraf/issues/5958*issuecomment-748216050__;Iw!!PBKjc0U4!cjP7hoQo1PoOt-p30ea9rHzYjI6AzCSSruv0ehRo2ifDKkbZV8ALeg38g8hTXWhBsS3miumh$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ASFPD7DVM5E2WYDJPOX35Q3SVOFVPANCNFSM4HT523DA__;!!PBKjc0U4!cjP7hoQo1PoOt-p30ea9rHzYjI6AzCSSruv0ehRo2ifDKkbZV8ALeg38g8hTXWhBsdWNcSkC$>.
|
You failed to post an image, so I don't even know your operating system (although it sounds like a non-unix like variant). To get the telegraf version, just supply the |
Feature Request
As an operator, I should be able to check InfluxDB (or the backend datastore) to query/understand how many of each version of telegraf agents are reporting in.
Proposal:
Current behavior:
Desired behavior:
Use case:
If I have 4,000 telegraf agents on 1.X and I'm performing an upgrade to 1.Y, I would like to ask/use InfluxDB to understand if all 4,000 agents are running 1.Y. If they are not all 1.Y, how many and which are still 1.X.
The text was updated successfully, but these errors were encountered: