Skip to content
Discussion options

You must be logged in to vote

@XiangyuZhang-G SQL Exporter is not compatible with Postgres Exporter one-to-one, so some changes might be needed.

I'd say in your case, your query returns multiple rows with the same value. For sql_exporter it's important to avoid collecting duplicate data points. So we have the following options here:

  • use SELECT DISTINCT to filter results on the database end (this should address redundant values);
  • add an extra column to the query that would make the result set distinct (if possible), and add this column name to key_labels parameter;
  • limit the result set with LIMIT 1.

sql_exporter is a database-agnostic exporter, so there is no master: true setting. It doesn't do any data processing to…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by XiangyuZhang-G
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants