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 query results contain space characters Unable to obtain key containing spaces #127

Open
junly917 opened this issue Jun 26, 2023 · 0 comments

Comments

@junly917
Copy link

SQL statement: dbcc sqlperf(logspace)

SQL Query result

Database Name	Log Size (MB)	Log Space Used (%)	Status
	master		1.992188		54.21569			0
	tempdb		132.8672		44.09655			0
	model		0.9921875	53.98622			0
	msdb		6.117188		17.0977			0
	testdbs		0.9921875	45.7185			0

sql_exporter.yaml config

     - metric_name: log_useage
        type: counter
        help: database log useage 
        key_labels:
          - Database\ Name
        values:
          - "Log Space Used (%)"
        query_ref: query_log

    queries:
      - query_name: query_log
        query: |
          dbcc sqlperf(logspace)

How to fill in the values of key and values

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

No branches or pull requests

1 participant