turbot/planetscale

GitHub
steampipe plugin install planetscalesteampipe plugin install planetscale

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_name
from
planetscale_audit_log
order by
created_at desc
limit
10

Find all branch creation events

select
created_at,
actor_display_name,
auditable_display_name,
target_display_name
from
planetscale_audit_log
where
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_name
from
planetscale_audit_log
where
target_type = 'Database'
and target_display_name = 'my_db'
order by
created_at desc

Most common actions

select
audit_action,
count(*)
from
planetscale_audit_log
group by
audit_action
order by
count desc

Most common actors

select
actor_id,
actor_display_name,
count(*)
from
planetscale_audit_log
group by
actor_id,
actor_display_name
order by
count desc

.inspect planetscale_audit_log

AuditLogs in the PlanetScale account.

NameTypeDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
actiontextShort action for this audit record, e.g. created.
actor_display_nametextDisplay name of the actor.
actor_idtextUnique ID of the actor.
actor_typetextType of the actor, e.g. User.
audit_actiontextFull action for this audit record, e.g. deploy_request.created.
auditable_display_nametextDisplay name of the resource for this audit entry, e.g. test_branch.
auditable_idtextUnique ID for the resource type of the audit entry.
auditable_typetextResource type the audit entry is for, e.g. Branch.
created_attimestamp with time zoneWhen the audit record was created.
idtextUnique ID of the log entry.
locationtextGeographic location the action was requested from.
metadatajsonbMetadata for the audit record.
remote_iptextIP address the action was requested from.
target_display_nametextDisplay name for the target resoruce, e.g. test_db.
target_idtextID of the resource type for this audit record.
target_typetextResource type for this audit record, e.g. Database.
typetextType of log entry, e.g. AuditLogEvent.
updated_attimestamp with time zoneWhen the audit record was updated.