From 77bfa8181d74d1027f1ac8a85861d309d05a5dad Mon Sep 17 00:00:00 2001 From: Andrey Afoninsky Date: Fri, 7 Jan 2022 15:15:34 +0100 Subject: [PATCH] chore: add vmalert_remotewrite_total metric (#2040) Co-authored-by: Andrey Afoninsky --- app/vmalert/group.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/vmalert/group.go b/app/vmalert/group.go index 45a10f0758..dc49798953 100644 --- a/app/vmalert/group.go +++ b/app/vmalert/group.go @@ -356,6 +356,7 @@ var ( execErrors = metrics.NewCounter(`vmalert_execution_errors_total`) remoteWriteErrors = metrics.NewCounter(`vmalert_remotewrite_errors_total`) + remoteWriteTotal = metrics.NewCounter(`vmalert_remotewrite_total`) ) func (e *executor) exec(ctx context.Context, rule Rule, resolveDuration time.Duration) error { @@ -369,6 +370,7 @@ func (e *executor) exec(ctx context.Context, rule Rule, resolveDuration time.Dur if len(tss) > 0 && e.rw != nil { for _, ts := range tss { + remoteWriteTotal.Inc() if err := e.rw.Push(ts); err != nil { remoteWriteErrors.Inc() return fmt.Errorf("rule %q: remote write failure: %w", rule, err)