From 88d043a3de2eab390ff7db6e941dfb0faceed6bf Mon Sep 17 00:00:00 2001 From: Sergey Lanzman Date: Mon, 9 May 2022 12:57:26 +0300 Subject: [PATCH] cloudwatch: add namespace in error message, move to warning --- plugins/inputs/cloudwatch/cloudwatch.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/inputs/cloudwatch/cloudwatch.go b/plugins/inputs/cloudwatch/cloudwatch.go index 7c0215ebbcac1..de4736dee0a51 100644 --- a/plugins/inputs/cloudwatch/cloudwatch.go +++ b/plugins/inputs/cloudwatch/cloudwatch.go @@ -328,7 +328,8 @@ func (c *CloudWatch) fetchNamespaceMetrics() ([]types.Metric, error) { for { resp, err := c.client.ListMetrics(context.Background(), params) if err != nil { - return nil, fmt.Errorf("failed to list metrics with params per namespace: %v", err) + fmt.Printf("failed to list metrics with namespace %s: %v", namespace, err) + break } metrics = append(metrics, resp.Metrics...)