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

Exposed replica information for monitoring readable secondaries #8322

Closed
wants to merge 15 commits into from

Conversation

bhsu-ms
Copy link
Contributor

@bhsu-ms bhsu-ms commented Oct 26, 2020

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

Modified queries in azuresqlqueries.go to include replica_ID and is_primary_replica for monitoring readable secondaries.

@bhsu-ms
Copy link
Contributor Author

bhsu-ms commented Oct 26, 2020

@denzilribeiro Could you please review this PR for exposing replica information to monitor readable secondaries?

@denzilribeiro
Copy link
Contributor

This won't work for Hyperscale btw as neither of these have rows in sys.dm_db_replica_states so will only work for Business critical.
,cast((SELECT replica_id FROM sys.dm_database_replica_states) as varchar(36)) AS [replica_id]
,cast((SELECT is_primary_replica FROM sys.dm_database_replica_states) as int) AS [is_primary_replica]

Copy link
Contributor

@denzilribeiro denzilribeiro left a comment

Choose a reason for hiding this comment

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

Added suggestions to make accross the board for MI/DB

plugins/inputs/sqlserver/azuresqlqueries.go Outdated Show resolved Hide resolved
plugins/inputs/sqlserver/azuresqlqueries.go Outdated Show resolved Hide resolved
@denzilribeiro
Copy link
Contributor

@bhsu-ms I am assuming will close this PR due to the other 2 PR's submitted? aka #8369 and #8368

@bhsu-ms
Copy link
Contributor Author

bhsu-ms commented Nov 23, 2020

@bhsu-ms I am assuming will close this PR due to the other 2 PR's submitted? aka #8369 and #8368

Thanks for reminding! Closing this one.

@bhsu-ms bhsu-ms closed this Nov 23, 2020
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.

2 participants