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

Update azure error messages when no resources are found #14327

Merged
merged 4 commits into from
Oct 30, 2019

Conversation

narph
Copy link
Contributor

@narph narph commented Oct 30, 2019

Should fix #14317

@narph narph requested a review from a team as a code owner October 30, 2019 12:50
@narph narph self-assigned this Oct 30, 2019
@narph narph added Team:Integrations Label for the Integrations team Metricbeat Metricbeat review [zube]: In Review and removed review labels Oct 30, 2019
@@ -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
Copy link
Contributor

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")
Copy link
Contributor

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?

Copy link
Contributor Author

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

@exekias exekias added needs_backport PR is waiting to be backported to other branches. v7.5.0 labels Oct 30, 2019
@narph narph requested a review from exekias October 30, 2019 15:02
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a 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.

@narph narph merged commit 36da195 into elastic:master Oct 30, 2019
narph added a commit to narph/beats that referenced this pull request Oct 30, 2019
* Limit error messages to log only

* Changelog update

* Update comments

(cherry picked from commit 36da195)
narph added a commit that referenced this pull request Oct 31, 2019
…ces are found (#14339)

* Update azure error messages when no resources are found (#14327)

* Limit error messages to log only

* Changelog update

* Update comments

(cherry picked from commit 36da195)

* Rezolve conflicts
@narph narph removed the needs_backport PR is waiting to be backported to other branches. label Jan 15, 2020
jorgemarey pushed a commit to jorgemarey/beats that referenced this pull request Jun 8, 2020
* Limit error messages to log only

* Changelog update

* Update comments
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Metricbeat Metricbeat Team:Integrations Label for the Integrations team v7.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Azure compute_vm_scaleset reports events with error.message when there's no vm scaleset
4 participants