Skip to main content
Audit logs are crucial for several reasons. First, they provide a detailed record of all user activities and system events, allowing organizations to monitor and analyze actions for security, compliance, and operational purposes. Second, in the event of a security breach or system failure, audit logs serve as a vital tool for forensic analysis, helping to identify the cause and impact of the incident. Finally, they assist in ensuring accountability by tracking user actions, which is essential for maintaining integrity and trust in information systems. Navigate to your organization’s page and click on “Audit Log.” You will see all audit logs arranged in descending order by their creation date. Each log entry is annotated with information about who performed the action, what was done, and when it occurred. Based on the icon next to the actor, you can determine if the action was performed directly by a user or through their API key. Additionally, several events generated from the Cosmo Platform can be identified accordingly. Organization admins can send audit logs to a Splunk HTTP Event Collector (HEC) from the “Export audit logs” button on this page. See Streaming to Splunk HEC. Choosing “None” as the destination and saving stops the stream and deletes the stored URL and token.
Cosmo Studio Audit Log showing user actions, namespaces, and timestamps for updates and creations.

Audit Log View

Streaming to Splunk HEC

Audit log streaming is an Enterprise plan feature.
Organization admins can stream audit logs to a Splunk HTTP Event Collector (HEC). New entries are delivered within about a minute of being written. Entries written before the stream was configured are not sent. Configure the stream with the platform API’s UpsertAuditLogStreamConfig, GetAuditLogStreamConfig, TestAuditLogStreamConfig and DeleteAuditLogStreamConfig methods, or with the wgc audit-log stream commands:
The endpoint can be the collector’s base URL or the full /services/collector/event URL. It must use HTTPS with a certificate from a trusted CA; Splunk Enterprise’s default self-signed HEC certificate is rejected. localhost is not accepted. The token is stored by Cosmo and is never returned. wgc audit-log stream delete stops the stream and removes the stored URL and token. Use a token with indexer acknowledgement disabled. Cosmo does not poll for acknowledgements. An event counts as delivered once the collector accepts it. Each event is sent with sourcetype wundergraph:cosmo:audit and source cosmo unless overridden. The event body looks like this:
Splunk indexes the event body itself, so fields are searched without an event. prefix:
Delivery is at least once. Use id to discard duplicates. Fields are only ever added to this body. If the collector rejects a batch, delivery pauses and retries every 30 seconds from the same point. GetAuditLogStreamConfig and wgc audit-log stream get return the last error and when the collector last accepted a delivery, including test events.