From de2b1040c464bf9533538fcaab471b90711e66bb Mon Sep 17 00:00:00 2001 From: Josh Powers Date: Fri, 11 Feb 2022 08:31:02 -0700 Subject: [PATCH] fix: use now as ecs timestamp The current ecs timestamp option will use the timestamp when an image was last pulled down. Because the tags are not changing for a specific ecs container this means that the metric never actually updates. By changing the timestamp to be the current time, which is more standard for metrics, users will get updated information for their fields. Fixes: #8375 --- plugins/inputs/ecs/ecs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inputs/ecs/ecs.go b/plugins/inputs/ecs/ecs.go index f044e8d2cb7fe..dfdc24e7a4c2b 100644 --- a/plugins/inputs/ecs/ecs.go +++ b/plugins/inputs/ecs/ecs.go @@ -172,7 +172,7 @@ func (ecs *Ecs) accTask(task *Task, tags map[string]string, acc telegraf.Accumul "limit_mem": task.Limits["Memory"], } - acc.AddFields("ecs_task", taskFields, tags, task.PullStoppedAt) + acc.AddFields("ecs_task", taskFields, tags) } func (ecs *Ecs) accContainers(task *Task, taskTags map[string]string, acc telegraf.Accumulator) {