diff options
author | Rasmus Dahlberg <rgdd@glasklarteknik.se> | 2025-01-04 14:22:20 +0100 |
---|---|---|
committer | Rasmus Dahlberg <rgdd@glasklarteknik.se> | 2025-01-04 14:22:20 +0100 |
commit | 8406a82803344fcf1284d72300cf69f54d5b5925 (patch) | |
tree | c86a303fb388d5f32723e80b3f6b57c51409429a /internal/manager | |
parent | b6bf2fdfd6fb9f4a2894c2a4dbfad3a82b75fdea (diff) |
prometheus: Add drafty error counter
Needs tuning, too noisy right now.
Diffstat (limited to 'internal/manager')
-rw-r--r-- | internal/manager/manager.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/manager/manager.go b/internal/manager/manager.go index 55e72c0..e302b4f 100644 --- a/internal/manager/manager.go +++ b/internal/manager/manager.go @@ -209,6 +209,9 @@ func (mgr *Manager) monitorJob(msg monitor.Event) error { return err } mgr.Metrics.LogState(msg.State) + for _, err := range msg.Errors { + mgr.errorJob(err) + } return nil } @@ -226,5 +229,6 @@ func (mgr *Manager) alertJob() error { func (mgr *Manager) errorJob(err error) error { mgr.Logger.Debugf("received error: %v\n", err) + mgr.Metrics.CountError() return nil } |