github RafiaSabih/pg_auth_mon v1.0
Initial release

latest releases: v3.0, v2.0
3 years ago

The goal of this extension is to ease monitoring of login attempts to your database. Although each failed login is written to database log file, but it is not straightforward to identify through that information alone if your database is under some malicious intents.

Information in the view pg_auth_mon are as follows,

Total number of successful attempts
Last timestamp of successful login
Last time of failed login attempt
Total number of failed login attempts because of some conflict in hba file
Total number of authentication failures because of other issues
Each valid user who attempts the login gets a tuple in this view
However, all the attempts of login via some invalid user names are summed up in a single tuple, with its oid being zero
The username for a given oid can be retrieved from the system table -- pg_roles

This extension can be used with PostgreSQL versions starting from v9.6.

Don't miss a new pg_auth_mon release

NewReleases is sending notifications on new releases.