Skip to content

Conversation

@sysadmind
Copy link
Contributor

The pg_database collector was not respecting the --exclude-databases flag and causing problems where databases were not accessible. This now respects the list of databases to exclude.

  • Adjusts the Collector create func to take a config struct instead of a logger. This allows more changes like this in the future. I figured we would need to do this at some point but I wasn't sure if we could hold off.
  • Split the database size collection to a separate query when database is not excluded.
  • Comment some probe code that was not useful/accurate

Signed-off-by: Joe Adams github@joeadams.io

@sysadmind sysadmind requested a review from SuperQ October 4, 2022 02:35
@sysadmind
Copy link
Contributor Author

also, this fixes #588

@sysadmind
Copy link
Contributor Author

@SuperQ Good idea. I removed the commented code.

@macmiranda
Copy link

@sysadmind you planning on fixing the conflicts?

The pg_database collector was not respecting the --exclude-databases flag and causing problems where databases were not accessible. This now respects the list of databases to exclude. - Adjusts the Collector create func to take a config struct instead of a logger. This allows more changes like this in the future. I figured we would need to do this at some point but I wasn't sure if we could hold off. - Split the database size collection to a separate query when database is not excluded. - Comment some probe code that was not useful/accurate Signed-off-by: Joe Adams <github@joeadams.io>
@sysadmind sysadmind force-pushed the exclude-database-fix branch from 44301fc to 66f6e11 Compare March 5, 2023 20:13
Signed-off-by: Joe Adams <github@joeadams.io>
@sysadmind sysadmind force-pushed the exclude-database-fix branch from 66f6e11 to 8d6ce05 Compare March 5, 2023 20:18
@sysadmind sysadmind requested a review from SuperQ March 5, 2023 20:21
Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more remove dead code.

Signed-off-by: Joe Adams <github@joeadams.io>
@SuperQ SuperQ merged commit c86f549 into prometheus-community:master Mar 5, 2023
@sysadmind sysadmind deleted the exclude-database-fix branch March 5, 2023 20:44
macmiranda referenced this pull request Mar 6, 2023
* Update Go to 1.20. * Update golanci-lint. * Bump modules. * Update CI orb. * Fix up use of deprecated ioutil. Signed-off-by: SuperQ <superq@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants