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

One question: why some parameters related automatically discover databases and a config file will be DEPRECATED. #886

Closed
Telzeng opened this issue Aug 10, 2023 · 7 comments

Comments

@Telzeng
Copy link

Telzeng commented Aug 10, 2023

What did you do?
Just check the Readme documents. One question:
why will some parameters related "automatically discover databases" and "a config file be DEPRECATED"?

auto-discover-databases (DEPRECATED) Whether to discover the databases on a server dynamically. Default is false.

extend.query-path (DEPRECATED) Path to a YAML file containing custom queries to run. Check out queries.yaml for examples of the format.

dumpmaps Do not run - print the internal representation of the metric maps. Useful when debugging a custom queries file.

constantLabels (DEPRECATED) Labels to set in all metrics. A list of label=value pairs, separated by commas.

version Show application version.

exclude-databases (DEPRECATED) A list of databases to remove when autoDiscoverDatabases is enabled.

include-databases (DEPRECATED) A list of databases to only include when autoDiscoverDatabases is enabled.

What did you expect to see?

Hello Experts,

we are using the metrics. but I noticed that the latest version talked that some parameters related "automatically discover databases" and "a config file" will be DEPRECATED. Could you explain why?
I guess that the new feature "Multi-Target Support" will have the same function as these parameters or not need them?

Thanks very much.
Telzeng

@Telzeng
Copy link
Author

Telzeng commented Aug 28, 2023

Hello Experts,

Do you have some updates on it? Thanks in advance.

Thanks very much.
Telzeng

@Vampouille
Copy link

Hello,

Are you planning to remove the ability to define custom queries? and only allow extension with collector written in golang ?

@richardnpaul
Copy link

v5 has been released and it does indeed remove these and customQueries which makes it pretty useless for me now given that most of my interesting monitoring that I was just starting to implement was all custom queries. E.g. I'd implemented these as custom queries. I'm still trying to figure out if there's another way to do custom queries that I've missed (the queries.yaml should link to any docs for it if there is)

@Telzeng
Copy link
Author

Telzeng commented Sep 6, 2023

Hi @richardnpaul,

Thanks for your reply.
Another parameter related "auto-discover-databases" will be DEPRECATED. Could you explain why remove it?

Thanks
Telzeng

@ARPABoy
Copy link

ARPABoy commented Nov 22, 2023

I need to monitor some query results not exposed as metric by the exporter, is there another way to do custom query and export the results?

@SuperQ
Copy link
Contributor

SuperQ commented Nov 22, 2023

The auto-discover-databases is deprecated as part of the queries.yaml removal. For collectors that pertain to internal PostgreSQL table metrics, we're going to have a new include/exclude filter flags to handle that on a per-collector basis. The original exporter design was a bit of a mess in this regard and we have been doing refactoring to get us in a better place to support this.

  • Queries that pertain to PostgreSQL server metrics should be added as new collectors in the collectors package. Feel free to file new issues detailing the specific metrics and queries that you would like to monitor.
  • Queries that are business domain, things that pertain to the contents of tables, should use a more appropriate exporter like the sql_exporter or query-exporter.

And yes, the multi-target mode is meant to replace the server connection handling for multiple instances.

@SuperQ
Copy link
Contributor

SuperQ commented Nov 22, 2023

I've filed #964 to track the flag cleanup.

@SuperQ SuperQ closed this as completed Nov 22, 2023
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

5 participants