Skip to content

Monitoring Role for Postgres Isntance #267

@tkcontiant

Description

@tkcontiant

As part of my work, I am thinking, to implement new role type MONITORING.

Probably this is Cluster/Instance level role, I am thinking where is the best place to create it.
Second, we have to Authorize, per DB connect privileges.

I have proposal, where we create normal user with MONITORING Role, second we Grant that new User/Role, connect in each DB individually.

I am curious to hear what is your opinion?

-- 1. Create role
CREATE ROLE postgres_exporter WITH LOGIN PASSWORD 'securepassword';

-- 2. Grant monitoring privileges
GRANT pg_monitor TO postgres_exporter;

-- 3. Grant CONNECT on all databases
GRANT CONNECT ON DATABASE mydb TO postgres_exporter;
GRANT CONNECT ON DATABASE otherdb TO postgres_exporter;
-- etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions