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

Add support for SQL Errors counter #370

Merged
merged 6 commits into from
Aug 3, 2019
Merged

Add support for SQL Errors counter #370

merged 6 commits into from
Aug 3, 2019

Conversation

btshft
Copy link
Contributor

@btshft btshft commented Aug 1, 2019

No description provided.

@martinlindhe
Copy link
Collaborator

SQLErrorsErrors sounds rather redundant. What about naming it simply SQLErrors?

@btshft
Copy link
Contributor Author

btshft commented Aug 1, 2019

SQLErrorsErrors sounds rather redundant. What about naming it simply SQLErrors?

I agree, naming looks redundant. I've tried to keep things in consist with original naming pattern: [CategoryName]+[Counter name]. But if it's required I can remove "Errors" suffix. Just to clarify, should I rename counter name too? So it will become {prefix}_sqlerrors instead of {prefix}_sqlerrors_errors

@carlpett
Copy link
Collaborator

carlpett commented Aug 3, 2019

How about {prefix}_sql_errors_total? That'd be in line with the general Prometheus recommendations.

@carlpett
Copy link
Collaborator

carlpett commented Aug 3, 2019

Thanks @callvirtual! Just did a quick check in the docs you linked (https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/sql-server-sql-errors-object), and there it seems there are multiple errors tracked. Are these all summed up in this collector?

@btshft
Copy link
Contributor Author

btshft commented Aug 3, 2019

How about {prefix}_sql_errors_total? That'd be in line with the general Prometheus recommendations.

Agreed, a good suggestion. I have already uploaded the fix. Tell me if something else needs to be fixed.

@btshft
Copy link
Contributor Author

btshft commented Aug 3, 2019

Thanks @callvirtual! Just did a quick check in the docs you linked (https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/sql-server-sql-errors-object), and there it seems there are multiple errors tracked. Are these all summed up in this collector?

There's how it looks (don't have real db with errors on laptop right now but it works fine, already tested)
https://i.imgur.com/kITXnNX.png

So the errors count can be split up by resource label in different buckets according to docs.

@carlpett
Copy link
Collaborator

carlpett commented Aug 3, 2019

Ah, great. Then this looks good to me!

@carlpett carlpett merged commit eb9cf56 into prometheus-community:master Aug 3, 2019
@carlpett
Copy link
Collaborator

carlpett commented Aug 3, 2019

Thanks!

@btshft
Copy link
Contributor Author

btshft commented Aug 3, 2019

I also plan to add support for Transactions counters soon as well. Will send PR in a couple days

@btshft btshft deleted the sql-errors-collector branch August 3, 2019 20:31
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.

4 participants