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

Documentation feedback: /docs/sources/reference/components/prometheus.exporter.mssql.md #1109

Open
TomClqncy opened this issue Jun 24, 2024 · 1 comment

Comments

@TomClqncy
Copy link

The doc says that, in order to create a custom metric, you need to use the query_config parameter to specify a file containing the SQL queries to execute.
The main issue is that prometheus.exporter.mssql can't read the file by path. So you need to use this:

local.file "ymlconfiglocation" {
  filename = "./configs/dbcm.yml"
}

prometheus.exporter.mssql "mysqlconnection" {
  connection_string = "myconnectionstring"
  query_config = local.file.ymlconfiglocation.content
}

It would be beneficial to have that in the doc.
Thanks

@hainenber
Copy link
Contributor

The Alloy doc does mention about using local.file's export as one of examples to pass to query_config parameter

image

Maybe having an example would be beneficial in this case :D

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

2 participants