Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: reduce log noise when ONTAP APIs do not exist #1901

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

cgrinds
Copy link
Collaborator

@cgrinds cgrinds commented Apr 5, 2023

refactor: do not log division by zero in metric_agent.go

refactor: do not log division by zero in metric_agent.go
@@ -359,7 +358,11 @@ func (c *AbstractCollector) Start(wg *sync.WaitGroup) {
}
// API was rejected, this happens when a resource is not available or does not exist
if errors.Is(err, errs.ErrAPIRequestRejected) {
c.Logger.Info().Str("task", task.Name).Msg(err.Error())
c.Schedule.SetStandByMode(task, 24*time.Hour)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also set the collector status here for metadata to show it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 369 does that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants