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

WIP: Implement mssql base counters #463

Merged

Conversation

secustor
Copy link
Contributor

Resolves #250

Continuation of #352 as this contribution seems to be abandoned.

@secustor secustor force-pushed the implement-mssql-base-counters branch from 8beba59 to 9d481c2 Compare February 14, 2020 15:05
@secustor secustor requested a review from carlpett February 14, 2020 15:09
Copy link
Collaborator

@carlpett carlpett left a comment

Choose a reason for hiding this comment

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

Thanks for taking this on @secustor! Some naming changes I'd like to see, otherwise looking good

collector/mssql.go Outdated Show resolved Hide resolved
@@ -662,6 +666,12 @@ func NewMSSQLCollector() (Collector, error) {
[]string{"instance"},
nil,
),
AccessMethodsWorktablesFromCacheRatio_Base: prometheus.NewDesc(
prometheus.BuildFQName(Namespace, subsystem, "accessmethods_worktables_from_cache_ratio_lookups"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Skip the _ratio here, since it is not lookups on the ratio

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, the metric accessmethods_worktables_from_cache_ratio should probably be accessmethods_worktables_from_cache_hits, right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

(The above seems to repeat for all the new changes)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The bases have no meaning on itself if you go by the Microsoft documentation.
Better said MS is not sharing what they are in their documentation.
Because of this I would prefer the naming style of @sqlkabouter .

We can't be sure here as we have to go with the documentation of Microsoft.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm sorry to be a bit contrarian here, but while I appreciate that the documentation is a bit vague and the current naming wrong, I'm not sure I'm keen on merging something which introduces more unclarity. The name here is pretty bad in that regard, in my opinion.
Looking at the docs you linked:

The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses.

By that definition, it seems pretty clear to me that we get the total lookups in the base, and total hits in the "non-base" counter? Are there other reasonable interpretations I'm missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems to be the case after testing with MS monitoring tools.
Our DB team will hopefully confirm with this Snapshot that the results using Prometheus+WMI_Exporter and MS tools report the same stats.

collector/mssql.go Outdated Show resolved Hide resolved
docs/collector.mssql.md Outdated Show resolved Hide resolved
@secustor
Copy link
Contributor Author

secustor commented Mar 1, 2020

@carlpett Can give me feedback what is not working in the pipeline?
It seems like I have no access to the logs.

@carlpett
Copy link
Collaborator

carlpett commented Mar 1, 2020

@secustor It seems it didn't even try to build... And Github's usability team could do better here I think - I need to hover over the failing check to get the text "AppVeyor was unable to build non-mergeable pull request". So if you resolve the conflict it will build.

@secustor secustor force-pushed the implement-mssql-base-counters branch from eed771c to b2f521d Compare March 1, 2020 22:36
@secustor secustor changed the title Implement mssql base counters WIP: Implement mssql base counters Mar 1, 2020
@carlpett
Copy link
Collaborator

carlpett commented Mar 2, 2020

I hope you can see the build logs this time? If not, the failing part is linting, specifically that the files are not gofmt:ed.

@secustor secustor force-pushed the implement-mssql-base-counters branch from 9d1b34e to 696c447 Compare March 2, 2020 13:40
Copy link
Collaborator

@carlpett carlpett left a comment

Choose a reason for hiding this comment

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

Shaping up nicely! Looks like there was a bit too much replaced, so the underlying WMI counters got renamed as well. But after that this looks good to me!

collector/mssql.go Outdated Show resolved Hide resolved
collector/mssql.go Outdated Show resolved Hide resolved
collector/mssql.go Outdated Show resolved Hide resolved
collector/mssql.go Outdated Show resolved Hide resolved
collector/mssql.go Outdated Show resolved Hide resolved
@secustor secustor force-pushed the implement-mssql-base-counters branch from 696c447 to 6dad58f Compare March 2, 2020 21:34
Copy link
Collaborator

@carlpett carlpett left a comment

Choose a reason for hiding this comment

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

🎉

@carlpett
Copy link
Collaborator

carlpett commented Mar 3, 2020

Thank you so very much @secustor! 👏

@carlpett carlpett merged commit 74d7332 into prometheus-community:master Mar 3, 2020
anubhavg-icpl pushed a commit to anubhavg-icpl/windows_exporter that referenced this pull request Sep 22, 2024
…ssql-base-counters

WIP: Implement mssql base counters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sql collector : strange values for bufman_buffer_cache_hit_ratio
2 participants