-
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
Add telegraf and go version to the internal input plugin #6216
Add telegraf and go version to the internal input plugin #6216
Conversation
Collecting telegraf version is useful to find outdated agents and match behavioural changes with version changes.
+1 |
plugins/inputs/internal/README.md
Outdated
@@ -12,10 +12,18 @@ plugin. | |||
[[inputs.internal]] | |||
## If true, collect telegraf memory stats. | |||
# collect_memstats = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we should deprecate this bool and have a collect_include
/collect_exclude
filter with "memstats", and "runtime" as values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just skip the new option altogether, always send the new values.
plugins/inputs/internal/README.md
Outdated
``` | ||
|
||
### Measurements & Fields: | ||
|
||
Telegraf version and Go version used to compile it. | ||
|
||
- internal_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make this be internal_runtime
and add collection for the other items dicussed here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a different take on this, I'll comment on the other issue but it doesn't need to be part of this PR. Here, let's add the Telegraf version as a tag on all existing metrics. With the Go version, I'm tempted to say we should just leave it out, but I suppose it wouldn't be a problem to add it as a go_version
tag on internal_agent
.
internal_agent,host=tyrion,version=1.12.0,go_version=1.12.5 foo=42
internal_write,output=file,host=tyrion,version=1.12.0 foo=42
plugins/inputs/internal/internal.go
Outdated
"github.com/influxdata/telegraf/plugins/inputs" | ||
"github.com/influxdata/telegraf/selfstat" | ||
) | ||
|
||
type Self struct { | ||
CollectMemstats bool | ||
SendVersion bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecate CollectMemstats
and use an include/exclude filter
telegraf/plugins/inputs/docker_log/docker_log.go
Lines 81 to 82 in 4e59d51
ContainerInclude []string `toml:"container_name_include"` | |
ContainerExclude []string `toml:"container_name_exclude"` |
filter, err := filter.NewIncludeExcludeFilter(d.ContainerInclude, d.ContainerExclude) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just skip the new option altogether, always send the new values.
Just get the tests passing and this will be good to go |
Hi, I updated to the latest version (1.12.0) but I'm not seeing the version tag. Is this only on specific counters? The counters associated to the config:
Suggestions? |
The new tag is only added to the measurements from the |
Collecting telegraf version is useful to find outdated agents and match
behavioural changes with version changes.
closes #5958
Required for all PRs: