-
Notifications
You must be signed in to change notification settings - Fork 770
Suggest using pg_monitor
role for PostgreSQL >= 10
#258
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
Comments
If someone could test what works for this, I'd be happy to update. |
The built in roles eliminate the need for having to make special SECURITY DEFINER functions to see all row data in views such as pg_stat_activity. We do this for the role we make for postgres_exporter and it makes a huge difference in simplicity for setup. You can see the difference in what is required in our PG9.6 setup file for our monitoring platform https://github.com/CrunchyData/pgmonitor/blob/master/exporter/postgres/setup_pg96.sql vs our PG10+ setup file https://github.com/CrunchyData/pgmonitor/blob/master/exporter/postgres/setup_pg10.sql We're able to eliminate a bunch of functions that are no longer necessary. |
It works fine with 12.6 |
Assuming In shell, as an OS user that has superuser or createrole access (e.g. createuser --role pg_monitor prometheus or in create user prometheus in role pg_monitor; |
#258 Document running as non-superuser on PostgreSQL versions 10 or newer.
…SQL versions 10 or newer. Signed-off-by: juris.greitans <[email protected]> Signed-off-by: Angus Dippenaar <[email protected]>
…SQL versions 10 or newer. Signed-off-by: juris.greitans <[email protected]> Signed-off-by: Angus Dippenaar <[email protected]>
…10 or newer. Signed-off-by: juris.greitans <[email protected]>
percona#258 Document running as non-superuser on PostgreSQL versions 10 or newer.
As of PostgreSQL 10, there are built-in roles that give access to extra statistics without needing to be superuser.
The documentation should suggest using creating an unprivileged user and granting the
pg_monitor
role to it.The text was updated successfully, but these errors were encountered: