Skip to main content
Authentication attempt reports provide a record of attempts to authenticate against your Postgres databases. You can use them to review connection activity, troubleshoot authentication failures, investigate unexpected access, or export authentication data for further analysis. Each record includes information such as the client IP address, credential used, targeted database and branch, and whether the attempt was allowed or denied. The source_ip in the report is the address of the client that connected to PlanetScale. This is especially useful for connections routed through a pooler, where Postgres server logs may show a PlanetScale infrastructure address instead of the original client address.
Generating a report is limited to Organization Administrators. Service tokens cannot generate reports.

Generate a report

Use the pscale CLI to generate and download a report. Specify a time window and, optionally, filters:
The download link expires 24 hours after the report is generated. If you need to download the report again after that, generate a new report.

What’s in the archive

Every archive contains exactly two files:

The data

Denials carry one of these reasons:

The manifest

manifest.json records how the report was generated:
Keep the manifest with the exported data when storing or sharing a report. It records the time window and filters used to produce the export. The report window uses [start_at,end_at) semantics: start_at is inclusive and end_at is exclusive.

Example queries

Filter by source IP

Pass a single address or a whole CIDR range:

Filter by credential

Use --username to find attempts made with a particular credential. For example, to return only denied attempts:

Export a time window for analysis

Omit filters to export all authentication attempts in a time window. For larger datasets, Parquet can be useful for analysis with tools such as DuckDB:
Because the archive includes its manifest, you can also share or retain the complete archive without separately recording the parameters used to generate it.

Combining filters

Filters combine with AND across different flags, and OR within a repeated flag. This request means “denied attempts, from either of these two ranges, using either of these two credentials”:

Choosing a format

CSV is the default. JSONL is selected by --format json, and Parquet must be requested with --export-format parquet.

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.