Skip to content

Max ttl for gauges in statsd input plugin #8348

@davidfaulkner12

Description

@davidfaulkner12

Feature Request

Proposal:

Allow for setting "gaugesMaxTTL" option in the statsd input plugin. Essentially, this from the core statsd repo:

https://github.com/statsd/statsd/pull/599/files

Current behavior:

If deleteGauges is set to "False" then once a gauge metric is reported it is reported for the life of the telegraf server. There is no way to set a TTL value where if the gauge metric is not received at the ingress endpoint after a certain time it is reset to 0.

Desired behavior:

An optional gaugesMaxTTL option is available for the statsd input -- this has exactly the same effect as the deleteGauges option, except that it only executes that logic after no input has been received for the value specified in gaugesMaxTTL.

Use case:

Telegraf server A on host X is taking input from service B and service C. Both of these services are reporting metrics via a gauge with "deleteGauges" set to False -- let's assume this is required w/o getting distracted by details. :-)

Now, service C is turned down by some load-managing automation. However, telegraf A will still report the last gauge metrics to Influx until restarted, with no way of ever reflecting the fact that service C is permanently gone.

Metadata

Metadata

Assignees

Labels

area/statsdfeature requestRequests for new plugin and for new features to existing pluginsgood first issueThis is a smaller issue suited for getting started in Telegraf, Golang, and contributing to OSS.help wantedRequest for community participation, code, contribution

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions