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

[iis] Fix service check on the _Total site #2387

Merged
merged 1 commit into from
Mar 28, 2016

Conversation

olivielpeau
Copy link
Member

Before 5.7.0, for sitename == '_Total', we used to send a service check.
5.7.0 to 5.7.2 were always sending a critical service check for this site name.

Go back to the previous behavior, and add a test case.

Should fix #2354

@@ -172,9 +172,15 @@ def ExecQuery(self, query, query_language, flags):
if query == ("Select ServiceUptime,TotalBytesSent,TotalBytesReceived,TotalBytesTransferred,CurrentConnections,TotalFilesSent,TotalFilesReceived," # noqa
"TotalConnectionAttemptsAllInstances,TotalGetRequests,TotalPostRequests,TotalHeadRequests,TotalPutRequests,TotalDeleteRequests," # noqa
"TotalOptionsRequests,TotalTraceRequests,TotalNotFoundErrors,TotalLockedErrors,TotalAnonymousUsers,TotalNonAnonymousUsers,TotalCGIRequests," # noqa
"TotalISAPIExtensionRequests from Win32_PerfFormattedData_W3SVC_WebService WHERE ( Name = 'Failing site' ) OR ( Name = 'Default Web Site' )"): # noqa
"TotalISAPIExtensionRequests from Win32_PerfFormattedData_W3SVC_WebService WHERE ( Name = 'Failing site' ) OR ( Name = 'Default Web Site' )"):
Copy link
Member

Choose a reason for hiding this comment

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

# noqa removed here but line is still pretty long, not sure if it would generate a flake8/pep8 warning... also it was kept in line 181 below. We should at least be consistent.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for catching this, definitely shouldn't have been part of my changes.

@truthbk
Copy link
Member

truthbk commented Mar 28, 2016

Other than the nitpick, it looks good! 👍

@truthbk
Copy link
Member

truthbk commented Mar 28, 2016

Let's make sure CI passes though, something weird happened to Travis.

@olivielpeau olivielpeau force-pushed the olivielpeau/fix-iis-service-check branch from b85d542 to 2f6c3cb Compare March 28, 2016 17:05
@olivielpeau
Copy link
Member Author

Addressed your comment, thanks!

The CI fails on python 2.6, apparently because of an issue with the install of psutil, I'll try to have a look, but I don't want to spend too much time on it since we'll stop supporting python2.6 soon.

@olivielpeau olivielpeau force-pushed the olivielpeau/fix-iis-service-check branch from 2f6c3cb to 1c3c4d7 Compare March 28, 2016 21:57
@olivielpeau olivielpeau merged commit ee52ed5 into master Mar 28, 2016
@olivielpeau olivielpeau deleted the olivielpeau/fix-iis-service-check branch March 28, 2016 23:46
@bronandrews
Copy link

What version what this resolved in?
Just installed latest (5.7.4) and still seeing continuous Warnings in the Collector Logs

2016-04-26 15:17:39 GMT Daylight Time | WARNING | checks.iis(iis.py:141) | When extracting metrics with WMI, found a non digit value for property 'name'.
2016-04-26 15:17:56 GMT Daylight Time | WARNING | checks.iis(iis.py:141) | When extracting metrics with WMI, found a non digit value for property 'name'.
2016-04-26 15:18:13 GMT Daylight Time | WARNING | checks.iis(iis.py:141) | When extracting metrics with WMI, found a non digit value for property 'name'.
2016-04-26 15:18:30 GMT Daylight Time | WARNING | checks.iis(iis.py:141) | When extracting metrics with WMI, found a non digit value for property 'name'.
2016-04-26 15:18:47 GMT Daylight Time | WARNING | checks.iis(iis.py:141) | When extracting metrics with WMI, found a non digit value for property 'name'.
2016-04-26 15:19:04 GMT Daylight Time | WARNING | checks.iis(iis.py:141) | When extracting metrics with WMI, found a non digit value for property 'name'.
2016-04-26 15:19:21 GMT Daylight Time | WARNING | checks.iis(iis.py:141) | When extracting metrics with WMI, found a non digit value for property 'name'.

@olivielpeau
Copy link
Member Author

Hi @bronandrews,

The changes brought by this PR were shipped with 5.7.3, and fixed the service check that's sent by the IIS check on the _Total website.

The warnings you see in the collector logs are false positives that are unrelated to this issue and should not have any impact on the behavior of the IIS check. We'll work on removing these warnings as they are clearly misleading.

Thanks!

@bronandrews
Copy link

That's great - good to know there is no underlying issue.

Many thanks for the swift response!

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.

[iis] Non-digit value in WMI metric name
3 participants