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

[wmi] if we timeout return an empty list to avoid exceptions. #2278

Merged
merged 1 commit into from
Feb 23, 2016

Conversation

truthbk
Copy link
Member

@truthbk truthbk commented Feb 22, 2016

No description provided.

@olivielpeau olivielpeau added this to the 5.7.0 milestone Feb 22, 2016
@yannmh yannmh self-assigned this Feb 22, 2016
@@ -54,12 +54,12 @@ def check(self, agentConfig):
u"Timeout while querying Win32_PerfRawData_PerfOS_System WMI class."
u" Processes metrics will be returned at next iteration."
)
return
return []

if not (len(self.wmi_sampler)):
self.logger.info('Missing Win32_PerfRawData_PerfOS_System WMI class.'
Copy link
Member

Choose a reason for hiding this comment

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

Can we take advantage of this PR to change these log levels to warning instead of info ? What do you think ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I agree that warning is probably more adequate for the len()==0 cases! Will change to warning and merge.

@yannmh
Copy link
Member

yannmh commented Feb 22, 2016

Nice catch @truthbk, thanks for the fix. Feel free to merge.

[wmi] adjusting message log level to warning
truthbk added a commit that referenced this pull request Feb 23, 2016
[wmi] if we timeout return an empty list to avoid exceptions.
@truthbk truthbk merged commit f656a50 into master Feb 23, 2016
@truthbk truthbk deleted the jaime/wmi_fix branch February 23, 2016 15:13
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.

3 participants