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

Unable to connect or collect SQL Server metertics through windows_exporter #1751

Closed
nanarala opened this issue Nov 20, 2024 · 7 comments · Fixed by #1753
Closed

Unable to connect or collect SQL Server metertics through windows_exporter #1751

nanarala opened this issue Nov 20, 2024 · 7 comments · Fixed by #1753

Comments

@nanarala
Copy link

Problem Statement

Please to connect Windows MS SQL server through windows_exporter

I am encountering the below error while trying to enable mssql collector to sql server for collecting sql server stats

c:\Program Files\windows_exporter>windows_exporter.exe --collectors.enabled="cs,os,cpu,mssql,memory,system,logical_disk,net,tcp,process,service" --web.listen-address=":8080"
time=2024-11-20T12:10:26.208-03:00 level=WARN source=cs.go:61 msg="The cs collector is deprecated and will be removed in a future release. Logical processors has been moved to cpu_info collector. Physical memory has been moved to memory collector. Hostname has been moved to os collector."
time=2024-11-20T12:10:26.208-03:00 level=WARN source=os.go:94 msg="The os collect holds a number of deprecated metrics and will be removed mid 2025. See #1596 for more information." collector=os
time=2024-11-20T12:10:26.731-03:00 level=ERROR source=exporter.go:190 msg="Couldn't load collectors" err="error build collector mssql: failed to build accessmethods collector: failed to create AccessMethods collector for instance SQLTest
: failed to add counter \SQLServer:MSSQL$SQLtest:Access Methods\AU cleanup batches/sec: The specified object was not found on the computer.\r\n"

Environment

  • windows_exporter Version:
  • Windows Server Version:
@jkroepke
Copy link
Member

What about the sql instance SQLtest on the system? Does it exists, but it is offline?

@nanarala
Copy link
Author

It is up and running fine and it is named an instance

SANSRV101\SQLTest is the instnace name

@jkroepke
Copy link
Member

Could you please run

typeperf -qx > counters.txt

on cmd.exe and upload the counters.txt

@nanarala
Copy link
Author

We couldn't upload files outside of our servers even Sandbox.

Please let me know what info you're looking for.

I want to know to establish connection to SQL Server through windows exporter and I want looking for .yaml file to connect SQL Server through .yaml

I can see all the SQLserver counters information on the results, apart from if you ae looking for anything let me know

\SQLAgent$sqltest:Jobs(Others)\Active jobs
\SQLAgent$sqltest:Jobs(Alerts)\Active jobs
\SQLAgent$sqltest:Jobs(Schedules)\Active jobs
\SQLAgent$sqltest:Jobs(_Total)\Active jobs
\SQLAgent$sqltest:Jobs(Others)\Successful jobs
\SQLAgent$sqltest:Jobs(Alerts)\Successful jobs
\SQLAgent$sqltest:Jobs(Schedules)\Successful jobs
\SQLAgent$sqltest:Jobs(_Total)\Successful jobs
\SQLAgent$sqltest:Jobs(Others)\Failed jobs
\SQLAgent$sqltest:Jobs(Alerts)\Failed jobs
\SQLAgent$sqltest:Jobs(Schedules)\Failed jobs
\SQLAgent$sqltest:Jobs(_Total)\Failed jobs
\SQLAgent$sqltest:Jobs(Others)\Job success rate
\SQLAgent$sqltest:Jobs(Alerts)\Job success rate
\SQLAgent$sqltest:Jobs(Schedules)\Job success rate
\SQLAgent$sqltest:Jobs(_Total)\Job success rate
\SQLAgent$sqltest:Jobs(Others)\Jobs activated/minute
\SQLAgent$sqltest:Jobs(Alerts)\Jobs activated/minute
\SQLAgent$sqltest:Jobs(Schedules)\Jobs activated/minute
\SQLAgent$sqltest:Jobs(_Total)\Jobs activated/minute
\SQLAgent$sqltest:Jobs(Others)\Queued jobs
\SQLAgent$sqltest:Jobs(Alerts)\Queued jobs
\SQLAgent$sqltest:Jobs(Schedules)\Queued jobs
\SQLAgent$sqltest:Jobs(_Total)\Queued jobs
\SQLAgent$sqltest:JobSteps(TSQL)\Active steps
\SQLAgent$sqltest:JobSteps(SSIS)\Active steps
\SQLAgent$sqltest:JobSteps(SmartAdmin)\Active steps
\SQLAgent$sqltest:JobSteps(PowerShell)\Active steps
\SQLAgent$sqltest:JobSteps(CmdExec)\Active steps
\SQLAgent$sqltest:JobSteps(ANALYSISQUERY)\Active steps
\SQLAgent$sqltest:JobSteps(ANALYSISCOMMAND)\Active steps
\SQLAgent$sqltest:JobSteps(_Total)\Active steps
\SQLAgent$sqltest:JobSteps(TSQL)\Queued steps
\SQLAgent$sqltest:JobSteps(SSIS)\Queued steps
\SQLAgent$sqltest:JobSteps(SmartAdmin)\Queued steps
\SQLAgent$sqltest:JobSteps(PowerShell)\Queued steps
\SQLAgent$sqltest:JobSteps(CmdExec)\Queued steps
\SQLAgent$sqltest:JobSteps(ANALYSISQUERY)\Queued steps
\SQLAgent$sqltest:JobSteps(ANALYSISCOMMAND)\Queued steps
\SQLAgent$sqltest:JobSteps(_Total)\Queued steps
\SQLAgent$sqltest:JobSteps(TSQL)\Total step retries
\SQLAgent$sqltest:JobSteps(SSIS)\Total step retries
\SQLAgent$sqltest:JobSteps(SmartAdmin)\Total step retries
\SQLAgent$sqltest:JobSteps(PowerShell)\Total step retries
\SQLAgent$sqltest:JobSteps(CmdExec)\Total step retries
\SQLAgent$sqltest:JobSteps(ANALYSISQUERY)\Total step retries
\SQLAgent$sqltest:JobSteps(ANALYSISCOMMAND)\Total step retries
\SQLAgent$sqltest:JobSteps(_Total)\Total step retries
\SQLAgent$sqltest:Alerts\Activated alerts
\SQLAgent$sqltest:Alerts\Alerts activated/minute
\SQLAgent$sqltest:Statistics\SQL Server restarted
\SQLAgent$sqltest:SystemJobs(Others)\Active system jobs
\SQLAgent$sqltest:SystemJobs(Alerts)\Active system jobs
\SQLAgent$sqltest:SystemJobs(Schedules)\Active system jobs
\SQLAgent$sqltest:SystemJobs(_Total)\Active system jobs
\SQLAgent$sqltest:SystemJobs(Others)\Successful system jobs
\SQLAgent$sqltest:SystemJobs(Alerts)\Successful system jobs
\SQLAgent$sqltest:SystemJobs(Schedules)\Successful system jobs
\SQLAgent$sqltest:SystemJobs(_Total)\Successful system jobs
\SQLAgent$sqltest:SystemJobs(Others)\Failed system jobs
\SQLAgent$sqltest:SystemJobs(Alerts)\Failed system jobs
\SQLAgent$sqltest:SystemJobs(Schedules)\Failed system jobs
\SQLAgent$sqltest:SystemJobs(_Total)\Failed system jobs
\SQLAgent$sqltest:SystemJobs(Others)\System Jobs activated/minute
\SQLAgent$sqltest:SystemJobs(Alerts)\System Jobs activated/minute
\SQLAgent$sqltest:SystemJobs(Schedules)\System Jobs activated/minute
\SQLAgent$sqltest:SystemJobs(_Total)\System Jobs activated/minute
\SQLAgent$sqltest:SystemJobs(Others)\Queued system jobs
\SQLAgent$sqltest:SystemJobs(Alerts)\Queued system jobs
\SQLAgent$sqltest:SystemJobs(Schedules)\Queued system jobs
\SQLAgent$sqltest:SystemJobs(_Total)\Queued system jobs

@jkroepke
Copy link
Member

Please let me know what info you're looking for.

I'm looking for all Performance collector starting with \SQLServer

We couldn't upload files outside of our servers even Sandbox.

Shouldn't be an issue here. Use the clipboard to copy data from the server to you local environment.

@jkroepke
Copy link
Member

I found a server where I could reproduce the issue. A fix will be merged soon

@nanarala
Copy link
Author

Please let me know what info you're looking for.

I'm looking for all Performance collector starting with \SQLServer

We couldn't upload files outside of our servers even Sandbox.

Shouldn't be an issue here. Use the clipboard to copy data from the server to you local environment.

Sure, Let me try that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants