telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

displacement on round_interval for improved remote monitoring

Open poulhs opened this issue 4 years ago • 3 comments

Feature Request

Make it possible to start checking on intervals that are NOT round_interval - most useful for measuring remote response.

Proposal:

Implement a displacement that will be added to round_interval.

Current behavior:

interval = "10s"
collection_jitter = "0s"
round_interval = true

causes collection to start at :00, :10, :20 etc

Desired behavior:

interval = "10s"
displacement = "5s"
collection_jitter = "0s"
round_interval = true

causes collection to start at :05, :15, :25 etc

Use case:

To provide the measurements for SLA reporting, we have several servers used for remote monitoring.

To simplify, assume a customers web-service. To monitor it we configure telegraf on two different servers. Both of these telegraf polls the web-service. The reason for having two servers is that we always have monitoring of the service - even when after patching the telegraf-servers (obviously assuming that we do not patch them at the same time), or having any other downtime on one of the telegraf-servers.

In normal situations (i.e. when both telegraf-servers are up), we would like to poll the web-service (almost) equidistantly. This cannot be achieve with todays configuration. With a displacement that would be easy and this would also reduce the time to detect that a service is down.

poulhs avatar Jan 08 '22 20:01 poulhs

Second this

unk1nd avatar Jan 09 '22 23:01 unk1nd

same as https://github.com/influxdata/telegraf/issues/1319 - Add time offset option to input plugins but have not duplicated info given here.

poulhs avatar Jan 27 '22 11:01 poulhs

Hey everyone, can you please test my PR #10545 implementing the requested feature and provide feedback in the PR? You can use the artifacts built by CI... Looking forward to your comments!

srebhan avatar Jan 28 '22 20:01 srebhan