-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Update azure error messages when no resources are found #14327
Conversation
@@ -81,7 +81,7 @@ func (client *Client) InitResources(fn mapMetric, report mb.ReporterV2) error { | |||
// users could add or remove resources while metricbeat is running so we could encounter the situation where resources are unavailable, we log and create an event if this is the case (see above) | |||
// but we return an error when absolutely no resources are found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comments needs to be updated I guess?
@@ -81,7 +81,7 @@ func (client *Client) InitResources(fn mapMetric, report mb.ReporterV2) error { | |||
// users could add or remove resources while metricbeat is running so we could encounter the situation where resources are unavailable, we log and create an event if this is the case (see above) | |||
// but we return an error when absolutely no resources are found | |||
if len(metrics) == 0 { | |||
return errors.New("no resources were found based on all the configurations options entered") | |||
client.Log.Error("no resources were found based on all the configurations options entered") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should be a debug message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no preference here, since this is not necessary an exception it could be a debug message instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and no empty events are reported now.
* Limit error messages to log only * Changelog update * Update comments (cherry picked from commit 36da195)
* Limit error messages to log only * Changelog update * Update comments
… resources are found (elastic#14339) * Update azure error messages when no resources are found (elastic#14327) * Limit error messages to log only * Changelog update * Update comments (cherry picked from commit d5467aa) * Rezolve conflicts
Should fix #14317