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

SqlServer Input: Add sqlserver ProcessID to SQL queries #7074

Open
mikedavem opened this issue Feb 24, 2020 · 5 comments
Open

SqlServer Input: Add sqlserver ProcessID to SQL queries #7074

mikedavem opened this issue Feb 24, 2020 · 5 comments
Labels
area/sqlserver feature request Requests for new plugin and for new features to existing plugins

Comments

@mikedavem
Copy link

Feature Request

Adding SqlServer Process ID to ServerProperties metrics

Proposal:

Adding SERVERPROPERTY('ProcessID') can help for correlation between win_perf_counters metrics and SqlServer Process counters and the corresponding SQL Server instance

Current behavior:

Currently there is no way to correlate CPU usage in interval of seconds

Desired behavior:

Having the ProcessID of the sqlservr process from ServerProperties query V2

Use case:

In a scenario where there is one SQL instance installed on a Windows Server, correlation with Win process counters is easy because there is only one instance of the sqlserver process. However, the current proposal would be helpful for SQL multi-instances scenarios due to multiple instances of the sqlservr process in win_perf_counters making the correlation between Win process counters and the corresponding SQL Instances impossible without the correct Process ID.

@danielnelson danielnelson added area/sqlserver feature request Requests for new plugin and for new features to existing plugins labels Feb 24, 2020
@mikedavem
Copy link
Author

I think we can close this feature request because metric is exposed through sqlserver_cpu_sqlserver_process_cpu

Regards

@mikedavem mikedavem reopened this Mar 4, 2021
@mikedavem
Copy link
Author

I reopen this issue because after some tests, sqlserver_cpu_sqlserver_process_cpu metric is unfortunately not enough accurate and not enough refreshed over the time to be included for monitoring. For example, if we compare variation in values over the time with SQL Server process:Processor Time% perfmon counter the latter provides more representative values.

Having a query that provides the current SQL Server process ID could make easier correlation with related SQL Server Process Perfmon counters

select SERVERPROPERTY('processid') AS SqlInstanceProcessId

@dba-leshop
Copy link
Contributor

dba-leshop commented Feb 7, 2022

@danielnelson any news on that one ? Any chance to consider this request feature for next plugin version ? Thank you for your feedback :)

dba-leshop added a commit to dba-leshop/telegraf that referenced this issue May 29, 2022
@dba-leshop
Copy link
Contributor

Hi @reimda , is it something we can consider for next releases ?

Thank you

@powersj
Copy link
Contributor

powersj commented Jan 4, 2023

@dba-leshop put up a PR and I am sure we can get folks to review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sqlserver feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

4 participants