Skip to content

Collecting GSSAPI statistics #119

Description

@cherts

Is your feature request related to a problem? Please describe.
It is necessary to collect the simplest statistics about GSSAPI:

  • Number of encrypted DB connections
  • Number of GSSAPI authenticated DB connections
  • Number of DB connections with delegated GSSAPI credentials

Describe the solution you'd like
Implement new postgres/gssapi collector

Number of encrypted DB connections:

SELECT COUNT(*) FROM pg_stat_gssapi 
JOIN pg_stat_activity ON pg_stat_gssapi.pid = pg_stat_activity.pid
WHERE encrypted = 't' AND datname IS NOT NULL;

Number of GSSAPI authenticated DB connections:

SELECT COUNT(*) FROM pg_stat_gssapi 
JOIN pg_stat_activity ON pg_stat_gssapi.pid = pg_stat_activity.pid 
WHERE gss_authenticated = 't' AND datname IS NOT NULL;

Number of DB connections with delegated GSSAPI credentials:

SELECT COUNT(*) FROM pg_stat_gssapi 
JOIN pg_stat_activity ON pg_stat_gssapi.pid = pg_stat_activity.pid 
WHERE credentials_delegated = 't' AND datname IS NOT NULL;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions