-
Notifications
You must be signed in to change notification settings - Fork 762
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
argument exclude-databases is not honored #353
Comments
Hi! Maybe #343 . Can you show metrics, which did not be exclude? |
@sfalkon I just ran into this issue myself and the exporter does NOT exclude the template databases like template0, ... databases by default and it also (when using i.e. PG_EXPORTER_EXCLUDE_DATABASES="postgres") does not exclude explicitly defined database names. |
Same trouble systemd unit file:
EnvironmentFile:
(it changes nothing if i define PG_EXPORTER_EXCLUDE_DATABASES or not)
|
This causes a problem for me too, I'm using Azure Database for PostgreSQL server which adds a database named "azure_maintenance" that is not meant to be accessible and only used by the managed service. For the following query for pg_database: I get an error: Whereas if I change the query to add a where clause it returns results successfully: I'm using the following helm chart for my deployment (which was recently updated to use the image from quay.io/prometheuscommunity/postgres-exporter rather than wrouesnel/postgres_exporter): And I am setting "config.excludeDatabases" to include "azure_maintenance" which previously was working but now no longer seems to be honored as the OP notes. |
+1 I set Thanks. |
+1 I've created a very small and simple custom query file:
My expectation on this one. pg_database should provide database and size for all DBs on given instance. pg_database_2 should provide ONLY the databse size on the DB I am connecting to since I explicitly added My exporter command and configuration: So, according the documentation it should avoid connecting to any of postgres,template0,template1 DBs. Then pg_database_2 should report target DB names and their sizes Scraping from the exposed metrics:
As you could see pg_database shows all the 4 DB names and sizes as expected. However, pg_database_2 is reporting postgres DB size which is wrong. IMO it should be reporting "nsoengas" DB size. If somebody have any idea it will be welcome. I've already tested several configuration and input formats on the excluding list Thank you in advance |
+1 |
+1 |
Also interested in this getting resolved |
v0.12.0 should fix this. If there are still problems, please let me know. Because this issue is so old, a more recent issue with all the relevant information would be good (version, logs, redacted config, etc). |
Confirming that this is fixed in version |
Hello,
Both
exclude-databases
cmd argument andPG_EXPORTER_EXCLUDE_DATABASES
are not honored bypostgre_exporter
.In both cases databases specified as string separated by
,
.After
systemctl daemon-reload
and restarting service, excluded databases metrics are still collected.exporter version:
postgres_exporter v0.8.0 (built with go1.11)
systemd nit:
Please advice.
Thank you for your time.
The text was updated successfully, but these errors were encountered: