Skip to main content

Export audit decisions to SIEM

Enterprise Tier

Tetrate Agent Router sends security records to a security information and event management (SIEM) system as OpenTelemetry (OTLP) logs. Audit records show who changed Agent Router. Guardrail triggers and request logs show what the gateway did with each request.


The two kinds of records leave Agent Router from different places. Each place has its own settings.

RecordsSent fromConfigured inFormat
Audit records: administrative actions, such as a guardrail edit or an API key revocationThe management planeThe Admin Console, under Audit Logs → ExportOTLP logs over HTTP, with JSON bodies
Guardrail triggers: one record each time a guardrail rule firesThe data plane collectorHelm values, global.observability.backends.custom[], signal guardrailtriggerOTLP logs over gRPC (otlp) or HTTP (otlphttp)
Request logs: one record for every request the gateway servesThe data plane collectorHelm values, global.observability.backends.custom[], signal requestlogOTLP logs over gRPC (otlp) or HTTP (otlphttp)

Agent Router sends OTLP only. Splunk, Datadog, and Amazon S3 receive the records through an OpenTelemetry Collector that the customer runs in front of them (see Step 4).

Persona: Platform operator working in the Admin Console and the data plane's Helm values, in coordination with the security team that owns the SIEM.

Estimated time: 30 to 45 minutes for both paths, plus the time to set up a collector when the SIEM does not accept OTLP.

When this guide applies​

SituationRecords that answer it
A security team must know who changed Agent Router, and whenAudit records
A security team must see which requests a guardrail blocked or redactedGuardrail triggers
Every request must be on record, whether it was allowed or refusedRequest logs
A budget or rate-limit refusal must be tracedRequest logs. Budget and rate-limit decisions are not guardrail triggers
Records must be kept longer than Agent Router keeps themThe SIEM copy, under the SIEM's own retention

To browse administrative events in the Admin Console instead, see Audit Agent Router activity. For the audit field schema, see Audit log events.

Outcomes​

By the end of this guide:

  • Audit records reach the SIEM from the management plane, and a test record has been found there.
  • Guardrail triggers, request logs, or both reach the SIEM from the data plane collector. On Fully Managed, Tetrate has been asked to add the destination.
  • The attributes that join records in the SIEM are known: tars.request.id for triggers and request logs, and audit.id for audit records.
  • The delivery delay and the delivery guarantee of each path are known.
  • The retention of the SIEM copy is understood as separate from Agent Router's own retention.

Prerequisites​

  • An Admin Console account with the super_admin role, for the audit export.
  • On Agent Router Enterprise Self-Hosted Data Plane: write access to the data plane's Helm values, usually through a GitOps repository.
  • A destination that accepts OTLP logs. When the SIEM does not accept OTLP, an OpenTelemetry Collector run by the customer receives the records and forwards them.
  • Network reachability. The audit destination must accept connections from the management plane. The data plane destination must accept connections from the data plane cluster.
  • At least one guardrail rule in a project, so that trigger records exist. A deployment with no guardrails produces audit records and request logs, but no triggers.

Step 1: know what each record carries​

Audit records​

The audit forwarder sends each audit record as one OTLP log record. The record body is a one-line summary, for example [email protected] UPDATE_GUARDRAIL guardrail/<id> succeeded. Severity is INFO for a successful action and ERROR for a failed one. The resource attribute service.name names the management plane that sent the record.

The fields of the audit log entry become record attributes:

AttributeAudit log field
audit.idid. Unique for each record. The SIEM removes duplicates on this attribute
audit.actionactionType
audit.actor.type, audit.actor.id, audit.actor.emailactorType, userId, userEmail
audit.resource.type, audit.resource.idresourceType, resourceId
audit.success, audit.errorsuccess, errorMessage
audit.correlation_idcorrelationId
audit.source.ip, audit.source.user_agentsourceIp, userAgent
http.request.method, http.route, http.response.status_codehttpMethod, endpoint, statusCode
audit.request.params, audit.request.body, audit.response.data, audit.metadatarequestParams, requestBody, responseData, metadata, each as a JSON string
audit.integrity.leaf_hash, audit.integrity.leaf_formatThe record's hash in the signed audit checkpoints

The record time is the audit entry's timestamp. An optional attribute is left out when its field is empty.

audit.source.ip is the address that connected to the management API. It is usually a console pod or the ingress, not the user's own address.

audit.correlation_id joins the audit records of one administrative call. It does not join audit records to request logs or guardrail triggers.

The forwarder also sends the signed audit checkpoints, as separate records. Audit records use the instrumentation scope fraser.audit-logs. Checkpoint records use the scope fraser.audit-checkpoints. Each checkpoint record carries the checkpoint's root hash, its signature, and the range of audit records it seals, in audit.checkpoint.* attributes. The SIEM then holds its own copy of each signed root. A later change to a sealed audit record can be detected against that copy.

Guardrail triggers​

A guardrail trigger exists only when a guardrail rule fires. A request that no rule acts on produces no trigger. The collector sends one OTLP log record for each rule evaluation. The full record shape is in The record consumers see. The attributes a SIEM rule usually needs:

  • tars.request.id: the request's x-request-id. Request log records carry the same attribute.
  • tars.guardrail.id and tars.guardrail.rule.id: the guardrail and the rule.
  • tars.guardrail.rule.action and tars.guardrail.rule.mode: what the rule is set to do, and whether it enforces or only monitors.
  • tars.user.id, tars.project.id, and gen_ai.request.model: the caller, the project, and the model.

Severity is ERROR only when the evaluation blocked the request or the response.

The Admin Console and the management API (ListGuardrailTriggers) give each trigger one verdict:

VerdictMeaning
BlockedAn enforced block rule fired, and the request was refused. A rule that runs on the response blocks after the provider has answered. So a blocked trigger does not prove that the provider was never called
RedactedNo enforced block rule fired, and another enforced rule did. The request went through with content removed
Would have blockedOnly monitor mode rules fired, and one of them is a block rule. The request was not changed
Would have redactedOnly monitor mode rules fired, and none of them is a block rule. The request was not changed

The management plane works out the verdict. The verdict is not a field of the collector record. The precedence rules are in Trigger events and verdicts.

From 0.14.0, a trigger read through the management API carries the request_id it fired on.

A trigger record carries no guardrail version. It names the guardrail and the rule, but not the version of the guardrail that was in force. The audit records for guardrail changes, such as CREATE_GUARDRAIL, UPDATE_GUARDRAIL, and SET_GUARDRAIL_STATUS, show when a guardrail changed, and who changed it. These audit records are matched to a trigger on the guardrail ID and the time.

Request logs​

The gateway writes one request log record for every request it serves, whether a guardrail acted on it or not. The requestlog collector copy is the full record, request and response bodies included.

Budget and rate-limit decisions are recorded on the request log, not in guardrail triggers. They are in the record's llm_parameters object, under budget_action, rate_limit, and reject_reason. The full field list is in What the metadata-only record contains.

Step 2: send audit records from the Admin Console​

  1. Sign in to the Admin Console with a super_admin account.
  2. Open Audit Logs from the sidebar and click Export. The Audit Logs Export page opens.
  3. Set Protocol to HTTP/JSON. The forwarder sends records only as OTLP over HTTP with JSON bodies. The list also offers gRPC and HTTP/Protobuf, but the forwarder sends no records with either of them.
  4. Set Forward mode. Every 5 minutes is the default. Real-time (push on event) gives the shortest delay. See Delivery delay and guarantee.
  5. Enter the receiver's URL in Endpoint, for example https://otel-collector.example.com:4318. The forwarder adds /v1/logs to the URL, unless the URL already contains /v1/logs.
  6. Choose an Authentication Type: None, Bearer Token, Basic Auth, or API Key. Enter the credential. API Key sends the key in the header named in Header Name, which is X-API-Key by default.
  7. Click Test Connection. The test sends one synthetic record through the same path as real records. The synthetic record has audit.action TEST and audit.resource.type audit-log-export, so the SIEM can filter it out. A failed test shows the error that the endpoint returned.
  8. Click Test and Save Configuration.

After the first save, the forwarder sends every existing audit record, oldest first, and then the new ones. A SIEM that should not hold old records filters them on the record time.

A saved credential is never shown again. When a credential is saved, Test Connection stays hidden until the credential is entered again.

The same settings are available through the admin API. CreateTelemetryConfig takes telemetry_type audit_logs and protocol http/json. When the request leaves forward_interval_seconds unset, the interval is 300 seconds. A value of 0 is the real-time mode.

Delivery delay and guarantee​

The forwarder checks for new records at least once a minute. An export is due when its interval has passed since the last record it sent.

Forward modeLongest wait for a new record
Real-time (push on event)About one minute. Records that the management API writes are usually sent within seconds. Records that the Admin Console writes itself wait for the next check
Every 5 minutes (default)About six minutes
Every minute, Every 15 minutes, Every 30 minutes, Every hourThe interval plus about one minute

Delivery is at least once. A batch is sent again when the destination returns an error or does not answer. So a record can arrive more than once, and the SIEM removes duplicates on audit.id. A batch that the destination accepts with a success status is not sent again. This holds even when the destination reports some records in the batch as rejected (an OTLP partial success). Delivery errors are written to the management plane's logs.

Step 3: send guardrail triggers and request logs from the data plane​

Self-Hosted Data Plane​

A backends.custom[] entry in the data plane's Helm values adds one OTLP destination to the data plane collector. The entry must name guardrailtrigger and requestlog in signals. These two signals never flow to an entry that does not name them. Both copies are always full content: request and response bodies, and the text a guardrail matched. The Admin Console content modes do not reduce them.

global:
observability:
enabled: true
backends:
custom:
- name: siem
protocol: otlphttp
endpoint: https://otel-collector.security.example.com:4318
signals: [guardrailtrigger, requestlog]
auth:
headers:
Authorization: { secretKey: SIEM_AUTH_HEADER }
sendingQueue: { queueSize: 64 }

protocol is otlp (OTLP over gRPC, the default) or otlphttp (OTLP over HTTP). The chart refuses any other value. SIEM_AUTH_HEADER is a key in the otel-gateway-backend-credentials Secret. Every field, the Secret, and a verification procedure are in Custom observability backends. These destinations are set in Helm values only. The Admin Console has no page for them.

The collector usually delivers records within seconds. Delivery is not guaranteed. Each destination has an in-memory queue. A full queue drops records, and a batch that still fails after 300 seconds of retries is dropped. A SIEM that must not miss records needs a collector with its own persistent queue close to the data plane. See Delivery semantics.

Fully Managed​

On Agent Router Enterprise Fully Managed, Tetrate runs the data plane and owns its Helm values. A Fully Managed customer cannot add a backends.custom[] destination today. Tetrate adds one on request. The request names the endpoint, the protocol (otlp or otlphttp), and the signals. Tetrate and the customer agree how the destination's credential is supplied.

The Admin Console guardrail settings say that extra destinations are configured by the platform team through Helm values. On Fully Managed, Tetrate is that team.

The audit export in Step 2 works the same way on Fully Managed.

Step 4: reach Splunk, Datadog, or Amazon S3​

Agent Router sends OTLP only. A destination that accepts OTLP logs receives the records directly. For any other destination, the customer runs an OpenTelemetry Collector between Agent Router and the SIEM. The collector receives OTLP from Agent Router. It forwards the records with an exporter for the destination.

Audit records arrive at the collector over HTTP. Data plane records arrive over gRPC or HTTP, as set by protocol. A receiver that accepts both:

receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

The exporters for the three common destinations are in the collector's contrib distribution:

DestinationExporter
Splunk, through the HTTP Event Collectorsplunk_hec
Datadogdatadog
Amazon S3awss3

Each exporter's README lists its settings, such as the token, the index, the bucket, and the region. The collector's address is the Endpoint in Step 2 and the endpoint in Step 3.

Step 5: verify that records arrive​

  1. Find the synthetic test record from Step 2 in the SIEM. Search for audit.action TEST.
  2. Make a small administrative change, for example disable a guardrail and enable it again. Find its audit records by audit.action (SET_GUARDRAIL_STATUS) and audit.resource.id. With Every 5 minutes, allow up to about six minutes.
  3. Send a request through the gateway that a guardrail rule acts on. Note the x-request-id of the request.
  4. In the SIEM, search for that value in tars.request.id. Expect one guardrail trigger record for each rule that evaluated, and one request log record.
  5. Confirm the searches the security team needs: by audit.actor.email, by audit.action, by tars.guardrail.id, and by severity.
SymptomCause and fix
No audit records arriveCheck that Protocol is HTTP/JSON and that the export was saved. Allow for the forward mode delay. Delivery errors are written to the management plane's logs
Test Connection is missingThe saved credential is not shown again. Enter the credential again to test
An audit record arrives twiceA batch was sent again after an error. Remove duplicates on audit.id
Old audit records arrive after the first saveA new export sends the existing history first
No trigger or request log records arriveThe entry does not name the signal in signals. An entry without signals receives metrics, traces, logs, and access logs only
Large request log records never arriveThe receiver's gRPC message limit is smaller than the record. Use protocol: otlphttp, or raise the receiver's limit

Step 6: account for the retention of exported copies​

A record in the SIEM is kept under the SIEM's retention policy, not Agent Router's.

  • Agent Router's audit records are not subject to the request log retention in Manage log retention and purge. The SIEM copy is governed by the destination.
  • An exported copy lasts as long as the destination keeps it. An Amazon S3 lifecycle rule, a Splunk index retention setting, or a Datadog retention setting governs it.
  • No Console or API operation deletes audit records or purges request log records in Agent Router. Removing a request log record from the management plane does not remove a copy already sent to the SIEM. The data plane collector copy never passes through the management plane at all.

For a right-to-erasure or subject-access response, "the record has been deleted" is true only for the store it names. Agent Router and each SIEM are separate stores, each on its own clock. See Manage log retention and purge for the retention on the Agent Router side and how erasure requests are handled.