You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
AFAICT, the documentation for rolling out helper functions seems to be outdated.
I expect two ways to roll out helper functions:
pgwatch does it on its own.
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
The text was updated successfully, but these errors were encountered:
Describe the bug
AFAICT, the documentation for rolling out helper functions seems to be outdated.
I expect two ways to roll out helper functions:
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
The text was updated successfully, but these errors were encountered: