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

Add telegraf and go version to the internal input plugin #6216

Conversation

adrianlzt
Copy link
Contributor

@adrianlzt adrianlzt commented Aug 6, 2019

Collecting telegraf version is useful to find outdated agents and match
behavioural changes with version changes.

closes #5958

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

Collecting telegraf version is useful to find outdated agents and match
behavioural changes with version changes.
@alvarolmedo
Copy link
Contributor

+1

@@ -12,10 +12,18 @@ plugin.
[[inputs.internal]]
## If true, collect telegraf memory stats.
# collect_memstats = true
Copy link
Contributor

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.

Copy link
Contributor

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.

```

### Measurements & Fields:

Telegraf version and Go version used to compile it.

- internal_version
Copy link
Contributor

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

Copy link
Contributor

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

"github.com/influxdata/telegraf/plugins/inputs"
"github.com/influxdata/telegraf/selfstat"
)

type Self struct {
CollectMemstats bool
SendVersion bool
Copy link
Contributor

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

ContainerInclude []string `toml:"container_name_include"`
ContainerExclude []string `toml:"container_name_exclude"`

filter, err := filter.NewIncludeExcludeFilter(d.ContainerInclude, d.ContainerExclude)

Copy link
Contributor

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.

@glinton
Copy link
Contributor

glinton commented Aug 6, 2019

Resolves #5958
Resolves #5900

@glinton
Copy link
Contributor

glinton commented Aug 7, 2019

Just get the tests passing and this will be good to go

@danielnelson danielnelson added this to the 1.12.0 milestone Aug 8, 2019
@danielnelson danielnelson merged commit eb89592 into influxdata:master Aug 8, 2019
@raider111111
Copy link

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:

     # The Telegraf Process Itself
     ObjectName = "Process"
     Instances = ["telegraf"]
     Counters = [
       "% Processor Time", "Working Set"
     ]
     Measurement = "win_process"

Suggestions?

@danielnelson
Copy link
Contributor

The new tag is only added to the measurements from the internal input plugin.

bitcharmer pushed a commit to bitcharmer/telegraf that referenced this pull request Oct 18, 2019
athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

telegraf should be able to report its version
5 participants