# Audit Log Examples: Fields, SIEM Logs and CloudTrail

> What an audit log is, with an example entry and fields, how audit logs differ from security and SIEM logs, what CloudTrail records, and retention rules.

Canonical: https://origindatapartners.com/guides/audit-log-examples
By: Origin Data Partners
Status: Published
Published: 2026-11-15
Updated: 2026-11-15
Sources checked: 2026-11-15

## Quick answer

An audit log is what a system keeps to show who did what, to which record, and when. NIST defines it as a chronological record of system activities. A typical audit log entry, for example, has a timestamp, an actor, an action, a target, an outcome and a source address. Security logs and SIEM logs are wider: they add events from firewalls, servers and security tools.

## Key points

- An audit log answers four questions for each event: when, where, who and what.
- Audit logs are one kind of security log. A SIEM collects many kinds in one place.
- CloudTrail event history covers the past 90 days of management events. Keeping more takes a trail or an event data store.
- The AWS Cost and Usage Report is a billing record, not a security log, but it shows what ran and when.

## What is an audit log?

NIST defines an audit log as "a chronological record of system activities, including records of system accesses and operations performed in a given period" ([NIST glossary](https://csrc.nist.gov/glossary/term/audit_log)). In practice it is the list a system keeps of who signed in, what they viewed or changed, and when. It is also called an audit trail.

An audit log is written for accountability, not for debugging. NIST's log management guide describes operating system audit records as holding "security event information such as successful and failed authentication attempts, file accesses, security policy changes, account changes" and use of privileges ([NIST SP 800-92](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-92.pdf)). Most business software keeps a similar record for its own actions: a setting changed, a report exported, a user given a new role.


## Audit log example: one entry and its fields

The audit log sample below is a single fictional entry from a web application: an administrator gives another user the admin role. OWASP's logging guidance says application logs must record "when, where, who and what" for each event ([OWASP](https://cheatsheetseries.owasp.org/cheatsheets/Logging_Cheat_Sheet.html)), and the fields map onto those four questions.

| Field | Question it answers | In the example |
| --- | --- | --- |
| timestamp | When | 14 March 2026, 09:42:17 UTC |
| actor | Who | User u_4821 |
| action | What | A role was updated |
| target | What it was done to | User u_5190 |
| changes | What changed | Role went from member to admin |
| outcome | Whether it worked | Success |
| source_ip, user_agent | Where from | One address and one browser |
| event_id, request_id | How to find it again | Unique IDs that tie the entry to other logs |

One audit log entry in JSON:

```json
{
  "timestamp": "2026-03-14T09:42:17Z",
  "event_id": "evt_7Q2M4X91",
  "actor": { "type": "user", "id": "u_4821", "email": "j.rivera@example.com" },
  "action": "role.update",
  "target": { "type": "user", "id": "u_5190" },
  "changes": { "role": { "from": "member", "to": "admin" } },
  "outcome": "success",
  "source_ip": "203.0.113.24",
  "user_agent": "Mozilla/5.0",
  "request_id": "req_9f3c2a"
}
```

Fictional data written for this page. Field names vary by product, but the same questions are answered. A good entry records the old and new values, and never the password or token used.


## How do audit logs differ from security logs and SIEM logs?

Security logs are the wider family. NIST says "a log is a record of the events occurring within an organization's systems and networks", and gives as common examples of computer security logs "audit logs that track user authentication attempts and security device logs that record possible attacks" ([NIST SP 800-92](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-92.pdf)). So an audit log is one kind of security log.

SIEM logs are whatever a security information and event management tool has collected. NIST defines a SIEM tool as an "application that provides the ability to gather security data from information system components and present that data as actionable information via a single interface" ([NIST glossary](https://csrc.nist.gov/glossary/term/security_information_and_event_management_tool)). The SIEM does not create most of its logs. It gathers them, puts them in a common shape and raises alerts.

| Log type | Who writes it | Typical content | Main use |
| --- | --- | --- | --- |
| Audit log | An application, database or operating system | User and admin actions with actor, target and outcome | Accountability and compliance evidence |
| Security logs | Firewalls, endpoint tools, servers, identity systems | Sign-in attempts, blocked traffic, malware detections, plus audit records | Detecting and investigating attacks |
| SIEM logs | Collected from all of the above | Normalized events, correlation results and alerts | One place to search, alert and report |
| Application or debug log | Developers, through the code | Errors, timings, stack traces | Troubleshooting |


## What do CloudTrail logs record?

CloudTrail is the audit log of an AWS account. AWS says "actions taken by a user, role, or an AWS service are recorded as events in CloudTrail", including actions taken in the console, the command line and the APIs ([AWS CloudTrail User Guide](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html)). Each event is a JSON record. The record contents page lists the fields; the ones below do most of the work ([CloudTrail record contents](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.html)).

| Field | What AWS says it holds |
| --- | --- |
| eventTime | "The date and time the request was completed, in coordinated universal time (UTC)." |
| userIdentity | "Information about the IAM identity that made a request." |
| eventSource | "The service that the request was made to." |
| eventName | "The requested action, which is one of the actions in the API for that service." |
| sourceIPAddress | "The IP address that the request was made from." |

The event history page in the console "only shows management events. It does not show data events, Insights events, or network activity events" ([AWS](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html)). Management events are changes to resources, such as creating a user or deleting a server. Reads and writes of the data inside a resource are data events, and they are recorded only when a trail or event data store is set up to capture them.


## What does the AWS Cost and Usage Report contain?

The AWS Cost and Usage Report (CUR) is a billing record, not a security log. AWS says it "contains the most comprehensive set of cost and usage data available" and that "each report contains line items for each unique combination of AWS products, usage type, and operation that you use in your AWS account" ([AWS Cost and Usage Reports User Guide](https://docs.aws.amazon.com/cur/latest/userguide/what-is-cur.html)). Files are delivered to an S3 bucket the company owns and updated at least once a day until the charges are finalized.

Each line item is one row. Common columns include lineItem/UsageStartDate ("the start date and time for the line item in UTC"), lineItem/UsageAccountId, lineItem/ProductCode, lineItem/UsageType, lineItem/UsageAmount, lineItem/UnblendedCost and, if switched on, lineItem/ResourceId ([line item details](https://docs.aws.amazon.com/cur/latest/userguide/Lineitem-columns.html)). Read next to CloudTrail, the report shows what each change to the infrastructure cost: one log says who started 40 servers, the other says what they cost per hour.


## How long should audit logs be kept?

There is no single rule. NIST separates two ideas: "log retention is archiving logs on a regular basis as part of standard operational activities", while log preservation "is keeping logs that normally would be discarded, because they contain records of activity of particular interest" ([NIST SP 800-92](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-92.pdf)). The period comes from the laws, contracts and security standards that apply to the company, written into its retention policy. The [data retention policy template](https://origindatapartners.com/blog/data-retention-policy-template) shows one way to set it out.

Defaults are often shorter than people assume. CloudTrail event history "is limited to the past 90 days of events", and AWS adds that "for an ongoing record of events in your AWS account, create an event data store or a trail" ([AWS](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html)). Some laws require the logging itself without naming a period: the HIPAA Security Rule requires mechanisms "that record and examine activity in information systems that contain or use electronic protected health information" ([45 CFR 164.312(b)](https://www.law.cornell.edu/cfr/text/45/164.312)). This page is general information, not legal advice.


## Common mistakes with audit logs

The same few gaps show up in most audits and incident reviews.

- Relying on a default window, such as 90 days of event history, and finding the log gone when an investigation starts.
- Logging the action but not the actor, the target or the old and new values.
- Writing secrets into logs. OWASP lists access tokens, passwords, database connection strings and encryption keys among data that should not be recorded directly.
- Letting administrators edit or delete the log they are recorded in.
- Using local time or unsynchronized clocks, so events from two systems cannot be put in order.
- Sending logs to a SIEM without keeping the original records needed as evidence.

Source: [OWASP Logging Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Logging_Cheat_Sheet.html)

## Are security logs and cloud bills also a data asset?

They can be. AI data buyers have asked Origin for records from B2B SaaS companies with 500 to 2,000 staff: code with git history, tickets, security logs and cloud bills. Logs and bills are useful together because they show how a real system was run, changed and paid for over time. For the neighboring record types, see [security incident data](https://origindatapartners.com/guides/license-security-incident-data-ai), [SOC case data](https://origindatapartners.com/guides/cybersecurity-incident-soc-case-data), [source code](https://origindatapartners.com/guides/sell-source-code-ai-training) and [agent traces](https://origindatapartners.com/guides/export-agent-traces).

Origin is an independent data partner. Your company decides what is shared and signs any license itself, and a buyer may pay Origin when a deal closes.

- Secrets and credentials: scan logs, code and configuration for keys, tokens and passwords, and rotate any that are found.
- Customer data: logs can carry customer names, tenant IDs, query text and file names. Remove or replace them.
- Personal data in logs: employee emails, user names and IP addresses identify people and usually need masking.
- Third-party and open-source license terms: check the terms of the security tools, cloud services and libraries the records came from.
- Customer contracts: many SaaS agreements limit how customer usage data and logs may be used. Read them before any record leaves the company.
- Cloud bills: account IDs, resource names and negotiated discount terms may be confidential under the cloud provider agreement.

Does your company hold records like these? [See what your data is worth](https://origindatapartners.com/check-fit).


## Questions and answers

### What is an audit log used for?

An audit log is used to show who did what and when in a system. Teams use it to investigate incidents, prove to auditors that controls work, and trace a change back to the person or service that made it.

### What should an audit log example include?

A useful audit log example includes a timestamp, the actor, the action, the target, the outcome and where the request came from. Unique event and request IDs let you match the entry against other logs.

### What is the difference between an audit log and SIEM logs?

An audit log is written by one system about its own activity. SIEM logs are the collected events of many systems, gathered into one tool that searches them, links related events and raises alerts.

### How long are CloudTrail logs kept by default?

CloudTrail event history keeps the past 90 days of management events in each Region. To keep events longer, or to record data events, create a trail that delivers to an S3 bucket or a CloudTrail Lake event data store.

### Is the AWS Cost and Usage Report a log?

Not in the security sense. The AWS Cost and Usage Report is a billing record with one line item for each combination of product, usage type and operation. It shows what ran and what it cost, not who made a change.

### Are security logs the same as audit logs?

No. Security logs is the wider term. It covers audit logs and also firewall, endpoint, identity and intrusion detection records. Every audit log is a security log, but not the other way round.

## Sources

- [NIST Computer Security Resource Center glossary: audit log](https://csrc.nist.gov/glossary/term/audit_log)
- [NIST SP 800-92: Guide to Computer Security Log Management](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-92.pdf)
- [NIST Computer Security Resource Center glossary: security information and event management (SIEM) tool](https://csrc.nist.gov/glossary/term/security_information_and_event_management_tool)
- [OWASP Logging Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Logging_Cheat_Sheet.html)
- [AWS CloudTrail User Guide: What is AWS CloudTrail?](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html)
- [AWS CloudTrail User Guide: Working with CloudTrail event history](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html)
- [AWS CloudTrail User Guide: CloudTrail record contents](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.html)
- [AWS Cost and Usage Reports User Guide: What are AWS Cost and Usage Reports?](https://docs.aws.amazon.com/cur/latest/userguide/what-is-cur.html)
- [AWS Cost and Usage Reports User Guide: Line item details](https://docs.aws.amazon.com/cur/latest/userguide/Lineitem-columns.html)
- [45 CFR 164.312(b): audit controls (HIPAA Security Rule)](https://www.law.cornell.edu/cfr/text/45/164.312)

## Related reading

- [Can a security company license alerts and incident data to AI?](https://origindatapartners.com/guides/license-security-incident-data-ai)
- [Cybersecurity Incident Data: A Guide for MSSPs and IR Firms](https://origindatapartners.com/guides/cybersecurity-incident-soc-case-data)
- [Can a company sell its source code to AI companies for training?](https://origindatapartners.com/guides/sell-source-code-ai-training)
- [Export Agent Traces: LangSmith, Langfuse, Phoenix and More](https://origindatapartners.com/guides/export-agent-traces)
- [/blog/data-retention-policy-template](https://origindatapartners.com/blog/data-retention-policy-template)
- [COBOL Code Example With a Copybook and JCL, Explained](https://origindatapartners.com/guides/cobol-jcl-legacy-code)
- [Penetration Test Report: Example, Template and Sections](https://origindatapartners.com/guides/penetration-test-report-example)
- [Anonymize PCAP Files and Logs Without Breaking Analysis](https://origindatapartners.com/guides/anonymize-pcap-files-logs)
- [WAF Rules: Managed vs Custom Rules and False Positives](https://origindatapartners.com/guides/waf-rules)
- [Can an ISP License Network Operations Records to AI?](https://origindatapartners.com/guides/isp-network-operations-data-ai)
