-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
SQLServer - Fixes sqlserver_process_cpu calculation #8549
Conversation
I had a look at it but tbh I've never had problems with the values returned by the query, the sum has always been 100. (looks like all the servers I see have only one physical CPU tho, so I can't replicate this yet). as a note, |
Thanks for the feedback @Trovalo. I haven't seen it before either. Until I have added this bigger server to the monitoring. Regarding the calculation, I have removed the decimal part so we keep the same behaviour as before. We are also just getting integers. I think we are not risking to lose something. Per MS documentation: So, it seems to be always a multiple. |
@ClaudioESSilva I've run the query on some instances with more than one physical CPUs without issues.
(I've removed the TOP 1 to fetch older rows) I've tried it on SQL 2005, 2008R2, 2012, 2016, 2017 without issues. |
It is a 2016 enterprise. |
Maybe something's wrong with that instance then. |
I don't think so. But, I need to get (ou ask someone) another server with similar config. I found that Solarwinds also discovered this |
In any case, this is good to go and will fix this (hopefully) rare issue. |
@ClaudioESSilva What versions have you tested this on currently? |
Hi @helenosheaa |
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.
Ok thanks @ClaudioESSilva looks good.
(cherry picked from commit 9aaaf72)
This fails on SQL 2008 due to formatting in the https://github.com/influxdata/telegraf/blob/master/plugins/inputs/sqlserver/sqlqueriesV2.go file in the sqlServerCPUV2 string section. I suspect an inadvertent paste. The semi-colon need to move to after the last END - Refer to below as this works on both: |
It was fixed for the new queries in #9130 With new queries I mean |
(cherry picked from commit 9aaaf72)
fixes #8548
Required for all PRs:
cc / @denzilribeiro @Trovalo