Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
SQL Server HA/DR Availability Group queries #8379
SQL Server HA/DR Availability Group queries #8379
Changes from 4 commits
8d61ca4
878ce05
742d58a
38fe95f
57f741d
56e3baa
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I don't understand why we need an "ignore default server" flag.
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.
Thank you @ssoroka for taking a look at this. The "ignore default server" flag was added for the case when the server list is empty and no server should be monitored. Without the flag, an empty server list would cause the localhost to be monitored, which would throw errors when using the agent for remote monitoring. Also, the localhost mechanism is valid only for SQL Server database type, but not for Azure SQL Database or Azure SQL Managed Instance. By adding the flag, the previous experience would work as is, and whoever does not want to monitor localhost can use this flag.
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.
I didn't spot that. tbh, I don't get why someone should leave the list empty even for localhost, I know the plugin will look for the default instance (port 1433) on localhost but I've never used that anyway as I want all to be explicitly set.
I'm not against the change, I just find it odd, if you don't want to use the plugin you can simply comment it out, or if you use multiple .conf file and the
--config-directory
you can simply change the file extension to something different than .conf and it will be ignored (I personally use this patterninput_sqlserver.conf.ignore
.In any case, this looks out of scope for this PR, as it should just add the new queries, can you propose this in a new PR?
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.
This isn't how we normally do defaults anyway. the default should go in the init() function, and then you don't need conditional checks like
that assume empty lists are unset. Let's remove this boolean and move the default to the init() function, and then explicitly empty lists will work properly.
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.
Thank you @ssoroka and @Trovalo for the feedback. Let me pull this change out and create a separate PR for it, so that HA/DR queries related changes can go ahead and get merged.
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.
@ssoroka and @Trovalo - I've reverted the default flag related changes and will create a separate PR for it. This PR now contains only changes for HA/DR queries. Please let me know if you have further feedback on this. If not, it'd be great to get this merged. Thank you.
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.
@ssoroka - Could you please help merge this PR if there are no concerns?