cast-ai-audit-events
Get a list of audit events from the CAST AI server.
Syntax
Options
- profile=STRING
- Optional. CAST AI connect profile identifier. Separate multiple profiles with commas. All CAST AI profiles are used if omitted.
- from=STRING
- Optional. Start time of range. yyyyMMddHHmmss format. If you omit time part, it will be padded by zero. If omitted, events are queried from 24 hours before the end time (to).
- to=STRING
- Optional. End time of range. yyyyMMddHHmmss format. If you omit time part, it will be padded by zero. If omitted, the current time is used.
- limit=INT
- Optional. Maximum number of events to return per profile. 1 to 10000, 1000 by default.
Output fields
| Field | Type | Name | Description |
|---|---|---|---|
| profile | String | Connect profile | CAST AI connect profile identifier |
| event_id | String | Event ID | Unique event identifier |
| _time | Date | Occurred at | Time the event occurred |
| ingested_at | Date | Ingested at | Time CAST AI ingested the event |
| event_domain | String | Event domain | Event domain, e.g. autoscaler |
| event_resource | String | Event resource | Event resource, e.g. cluster |
| event_action | String | Event action | Event action, e.g. paused |
| level | String | Severity | Event severity, e.g. info |
| actor_type | String | Actor type | Actor type, e.g. user, system |
| actor_email | String | Actor email | Email address of the actor |
| resource_name | String | Resource name | Name of the target resource |
| cluster_id | String | Cluster ID | Identifier of the cluster the event occurred |
| description | String | Description | Summary of the event |
The table above is a subset. All fields except profile are the same as the cast-ai-audit log schema stored by the logger.
Error codes
Parsing errors
| Error message | Cause | Resolution |
|---|---|---|
| No available CAST AI profile found. | No CAST AI connect profile is registered | Register a profile in System > Connect Profile |
| Specify valid CAST AI profile. | The profile option has an invalid value | Enter the identifier of a registered profile |
| limit must be an integer between 1 and 10000. | The limit is out of range or not a number | Specify an integer from 1 to 10000 |
Runtime errors
| Error message | Cause | Resolution |
|---|---|---|
| CAST AI API error: HTTP 401 ... | The API key is invalid or expired | Check the API key of the connect profile and reissue it |
| CAST AI API error: HTTP 403 ... | The API key lacks permission | Use a key that can read audit logs |
| CAST AI request failed: GET ... | Network failure, proxy, or certificate validation | Check HTTPS/443 reachability and proxy or private CA settings |
Description
The command calls the CAST AI audit events API with the API key stored in the connect profile and returns events in the given range in ascending order of occurrence time. The range includes the start time and excludes the end time. When you specify several profiles, or omit the option, the profiles are queried one after another, and limit applies per profile.
The result uses the same field names as the logs stored by the logger (except profile), so you can reuse queries written for the collected table.
To backfill events the logger missed, see the scenario for events missed by collection in the user guide.