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 about helper functions rollout seems outdated #606

Open
markwort opened this issue Dec 20, 2024 · 0 comments
Open

documentation about helper functions rollout seems outdated #606

markwort opened this issue Dec 20, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation metrics Metrics related issues

Comments

@markwort
Copy link
Contributor

Describe the bug
AFAICT, the documentation for rolling out helper functions seems to be outdated.
I expect two ways to roll out helper functions:

  1. pgwatch does it on its own.
  2. I run some sql scripts against a database.

Since the former only works in cases where pgwatch has a lot of privileges in the target database and this is not always compatible with security requirements, I expect that a way to use the second option exists.

However, as far as I can tell, pgwatch no longer ships the /etc/pgwatch/metrics/00_helpers/* files, which could be used to create the helpers with adequate privileges.
Yet, the documentation still mentions that this is how to roll out metrics helpers:
https://pgwat.ch/latest/tutorial/preparing_databases.html#rolling-out-common-helpers

Expected behavior

There should be a way to retrieve the definitions for helper functions in plain text SQL, so that they can be run by a user with sufficient privileges in the database-to-be-monitored, and then the pgwatch user can be granted execute privilege on the helper function.
In direct communication, @pashagolub mentioned that something like pgwatch metric "metric_name_or_preset" --init | psql -d target should already be in pgwatch, but I cannot really find if this is the case by looking at the source code quickly.
If this is the case, the documentation should be updated accordingly.

Best regards
Julian

@markwort markwort added documentation Improvements or additions to documentation metrics Metrics related issues labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation metrics Metrics related issues
Projects
None yet
Development

No branches or pull requests

1 participant