Skip to content

Standardize on tag representing the source host of the metrics #4413

@danielnelson

Description

@danielnelson

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 name source mirrors Wavefront style (#4402). The host 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:

docker,engine_host=debian-stretch-docker
nginx,server=localhost,port=80
mongodb,hostname=127.0.0.1:27017
prometheus,url=http://example.org:9273/metrics

Desired behavior:

docker,source=debian-stretch-docker
nginx,source=localhost,port=80
mongodb,source=127.0.0.1,port=27017
prometheus,source=example.org,port=9273,resource=/metrics,scheme=http

Use case:

Unification of the tag name and format will allow lookup of metrics from a particular hostname.

Metadata

Metadata

Assignees

No one assigned

    Labels

    rfcRequest for comment - larger issues that require clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions