vitabaks / postgresql_cluster

PostgreSQL High-Availability Cluster (based on Patroni). Automating with Ansible.
https://postgresql-cluster.org
MIT License
1.48k stars 394 forks source link

How to create users to management for full access and read only users for netdata log monitoring? #691

Closed algoritmsystems closed 4 weeks ago

algoritmsystems commented 1 month ago

How to create users to management for full access and read only users for netdata log monitoring system? Is it doing on leader node? Thanks in advance!

vitabaks commented 1 month ago

You can do this simply by using SQL or by defining them in the postgresql_users variable in order for automation to create these users.

algoritmsystems commented 1 month ago

Thanks you very much for your work!

Jamic28 commented 1 month ago

You can do this simply by using SQL or by defining them in the postgresql_users variable in order for automation to create these users.

I configured main.yml:

...postgresql_users:

  • { name: "{{ pgbouncer_auth_username }}", password: "{{ pgbouncer_auth_password }}", flags: "LOGIN", role: "" }
  • { name: "logmon", password: "logmonpass", flags: "LOGIN", role: "pg_monitor" } ...

But how to loging in netdata web interface with logmon user?

vitabaks commented 1 month ago

How is Netdata related to this? This is a user of the Postgres database.

Jamic28 commented 1 month ago

You can do this simply by using SQL or by defining them in the postgresql_users variable in order for automation to create these users.

I tried follow this instructions. I thought that netdata stores it's metrics and logs in this database. In my main.yml file I configured "netdata = true", so it is installing and working from the address ip:19999. But everyone has access to this web. Can I restrict access to the netdata by creating users for monitoring and for administring separately? Thank you in advance!

vitabaks commented 1 month ago

As far as I know, there is no authorization in the local Netdata, only in the cloud. Please see the documentation of the Netdata project.

Jamic28 commented 1 month ago

As far as I know, there is no authorization in the local Netdata, only in the cloud. Please see the documentation of the Netdata project.

yes, but some functions as logs you can's see without sign in. Did you try to integrate pmm instead of netdata?

vitabaks commented 1 month ago

Did you try to integrate pmm instead of netdata?

No. See related issue https://github.com/vitabaks/postgresql_cluster/issues/249