-
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
Standardize on tag representing the source host of the metrics #4413
Comments
Been pondering this since the ping, and I'm still unsure about the name. I think standardizing on something is a good idea, as it is a very common occurrence that the metrics being recorded aren't about the host telegraf is running on. It's just the name |
I also think "agent" would cause confusion with the existing "host" tag, since we promote Telegraf as an agent. That said I'm not sure the proposed "source" and "host" are any better, and I could imagine either name being used to refer to the host running Telegraf. In many ways I would rather swap the meaning of agent/source with host, but of course it would be too disruptive so we won't be doing that. I do slightly prefer "origin" over "source", but I don't think the difference is enough to justify differing from other tools. |
I did some digging internally to find out why we have it called The Wavefront platform treats host/source special versus other tags, and provides functionality around it. One of Wavefront's early customers, was interested in instrumenting entities beyond just hosts, and we certainly provided the functionality to do what they asked, however the semantics of calling the entity hosts could be perceived incorrectly. After some discussions with the customer, the name TBH we didn't consider origin at all, and though in some sense I can see it, when it comes to monitoring and metric data, sources seems more fitting. Data is often associated with having a source. (ie: the term data sources) |
Let's use |
One minor detail that I think we should provide guidance on. In the case that the source self reports its hostname, should we favor the host reported hostname or the connection hostname? For example, let's say a plugin connects to https://10.1.2.3 and it returns a message |
self reported hostname should overrule. In this case |
A few more cases I've been thinking about:
My current thoughts are that we should add |
Loopback can be described as: I agree source should pull |
I think we can use IsLoopback to recognize all the forms. |
@danielnelson What is the state on this with the snmp input plugin? It currently still uses |
We are not currently planning a 2.0 release in the foreseeable future. New plugins should generally use the In terms of updating existing plugins, happy to see PRs with config options to switch the value, or for users to use the rename processor to produce a more consistent experience. |
Correct, so why closing this? I just fixed a few of those plugins not yet following this guideline. There are still others to be done. |
You can open new issues as you put up PRs |
IMHO it makes more sense to let these PRs refer to this issue. |
Feature Request
Proposal:
The
host
tag in Telegraf reports the hostname of the system running Telegraf, but when using a plugin that gathers from another service on the network, it can be helpful to know the hostname running the service.Use
source
as the tag name and a domain name as the value. The namesource
mirrors Wavefront style (#4402). Thehost
tag would be unchanged, which means some metrics would begin having both tags:host=example.org,source=example.org
.The new tag would, of course, be a convention only. Users would be free to add any value to this tag or tagexclude it completely. There wouldn't be any special syntax added to the telegraf.conf as was done with the
host
tag, and each plugin would be responsible for adding the appropriate value.Current behavior:
Variety of tags are used, with a variety of value formats, here is a sample:
Desired behavior:
Use case:
Unification of the tag name and format will allow lookup of metrics from a particular hostname.
The text was updated successfully, but these errors were encountered: