Enable agent to send Version string #6104
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR (addresses #5958) introduces a monitor for the agent itself - this is a small, specific “mini agent” that sits alongside the main agent (rather than within the lower-levels, where the plugins live). Due to this, it is able to listen for signals (from telegraph), and also see and report on any meta-data concerning the agent itself - for example, the version string, number of inputs etc (which no plugin can see because it has no visibility back up into the agent). This agent monitor is autonomous once started, and does not interact with the main agent.
It brings the following functionality:
able to parse version string at runtime from agent itself.
split string into numeric fields allowing sorting / filtering etc.
validates that it is semantic in format.
via config, allows for ignoring version format, which will send the string to DB, but not numerics (as these are no longer useful if format is invalid). Can be useful in testing.
listen and report on signals received by telegraf.
all configurable via telegraf agent configuration (frequency, what it collects etc).
The version allows for queries like this (Chronograf as example):
And the state changes look like this:
Required for all PRs: