Table: planetscale_audit_log
Query audit log records for API operations on your account.
Examples
Most recent actions for the account
select created_at, audit_action, actor_display_name, auditable_display_name, target_display_namefrom planetscale_audit_logorder by created_at desclimit 10
Find all branch creation events
select created_at, actor_display_name, auditable_display_name, target_display_namefrom planetscale_audit_logwhere audit_action = 'branch.created'order by created_at desc
Find events targeting a specific database
select created_at, audit_action, actor_display_name, auditable_display_name, target_display_namefrom planetscale_audit_logwhere target_type = 'Database' and target_display_name = 'my_db'order by created_at desc
Most common actions
select audit_action, count(*)from planetscale_audit_loggroup by audit_actionorder by count desc
Most common actors
select actor_id, actor_display_name, count(*)from planetscale_audit_loggroup by actor_id, actor_display_nameorder by count desc
.inspect planetscale_audit_log
AuditLogs in the PlanetScale account.
Name | Type | Description |
---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. |
action | text | Short action for this audit record, e.g. created. |
actor_display_name | text | Display name of the actor. |
actor_id | text | Unique ID of the actor. |
actor_type | text | Type of the actor, e.g. User. |
audit_action | text | Full action for this audit record, e.g. deploy_request.created. |
auditable_display_name | text | Display name of the resource for this audit entry, e.g. test_branch. |
auditable_id | text | Unique ID for the resource type of the audit entry. |
auditable_type | text | Resource type the audit entry is for, e.g. Branch. |
created_at | timestamp with time zone | When the audit record was created. |
id | text | Unique ID of the log entry. |
location | text | Geographic location the action was requested from. |
metadata | jsonb | Metadata for the audit record. |
remote_ip | text | IP address the action was requested from. |
target_display_name | text | Display name for the target resoruce, e.g. test_db. |
target_id | text | ID of the resource type for this audit record. |
target_type | text | Resource type for this audit record, e.g. Database. |
type | text | Type of log entry, e.g. AuditLogEvent. |
updated_at | timestamp with time zone | When the audit record was updated. |