-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat(inputs.sqlserver): Add SERVERPROPERTY(''IsHadrenabled'') #13448
Conversation
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 🥳 This pull request decreases the Telegraf binary size by -10.79 % for linux amd64 (new size: 167.0 MB, nightly size 187.2 MB) 📦 Click here to get additional PR build artifactsArtifact URLs |
Thanks for the PR @Trovalo thoughts on this addition? I thought we produce a number of other metrics if |
That's correct, as of now there are two queries to get data about hadr, sqlServerAvailabilityReplicaStates and sqlServerDatabaseReplicaStates. Also, the properties just says if the feature is enabled, and that does not mean it's actually used... I'd query the usage and maybe check how many "Always On availability groups" I've got on the instance |
Maybe the use case is to local, and a custom local build is better, our use case was "how can I as a data consumer" or "how can I as a new employee" in the Grafana dashboard understand that this server is a part of AAG. As you say the settings state does not say anything about the usage... |
@soccypowa I'm not sure I fully understand your answer... To see if hadr is actually used you could just check the two mentioned metrics for indications of usage. If you want to know if hadr is enabled we can merge the PR. Just let me know which state you are aiming for... |
@srebhan My aim is to se the setting's state. (To see usage I have the already available queries for "hadr related metrics". Which I hopefully then enabled for the correct instances). The reason for wanting to se the setting's state is to see that it is not erroneously set where it should not, and to simplify the display for less technical users (or new employees) that this instance is part of an AAG setup. Don't know if this is strong enough a case. |
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.
@soccypowa in this case, thank you for your contribution! Looks good to me.
resolves #12799
Added the gathering of the serverproperty IsHadrEnabled in the sqlserver_server_properties, following the design ideas given in the issue that this pull request solves.
Did not find any tests so I ran some rudimentary tests on SQL 2014 (to my knowledge the oldest one supported by MSFT) gave the expected result according to this MSFT page.