Docs
DocumentationQuery ReferenceAPI Reference
Open Console→→
DocumentationQuery ReferenceAPI Reference

Platform overview

What is Axiom?QuickstartArchitectureFeatures
Fundamentals
Datasets
Edge deployments
Limits
Performance
Optimize usage
Requirements
Semantic conventions
Glossary
Tour
SecurityRoadmap

Send data

Reference architecturesMethods

Understand data

Console
Query
Builder
Editor
Query results
Visualize
Traces
Metrics
Correlations
Save queries
Stream
Dashboard
Create
Elements
Create
Configure
Element types
Gauge
Heatmap
Log stream
Monitor list
Note
Pie chart
Scatter plot
Statistic
Table
Time series
Sections
Configure
Filter
Monitor
Overview
View status
Configure
Examples
Monitor types
Anomaly
Match
New values
Threshold
Alerting
Overview
Configure
Notifier types
Amp
ChatGPT Workspace Agent
Claude Code
Cursor
Custom Webhook
Discord
Email
incident.io
Jira Service Management
Microsoft Teams
Opsgenie
PagerDuty
Slack
Annotations
Command Menu
Manage
Datasets
Overview
Views
Virtual fields
Access
RBAC
Tokens
CLI
Organization
Labels
Audit log
Settings
Usage and billing
Profile
Extend
Overview
AWS Lambda
AWS PrivateLink
Cloudflare Workers
Cloudflare Logpush
Convex
Grafana
Hex
Netlify
Supabase
Tailscale
Terraform
Unkey
Vercel
Intelligence
Overview
Spotlight
AI agents
Overview
MCP Server
Overview
Tools
Query cost limits
Agent-created orgs
Skills
Overview
Axiom alerting
Build dashboards
Control costs
SRE
Translate SPL to APL
Splunk
Overview
Splunk app
Install and configure
Commands
Examples
Portal
How it works
Set up standard mode
Set up transparent mode
Observability Cloud
OCSF data
OCSF as CIM
SPL command support
Examples
Monitor and troubleshoot

Use cases

ObservabilityProduct analytics
OCSF security data
Overview
Send data
Query data
LLM observability
Overview
Use Vercel AI SDK
Manual instrumentation
GenAI attributes
Redaction policies

Miscellaneous

LLMs
Overview
List of docs pages
Full docs
Query reference
FAQs
Legal
Acceptable use policy
Axiom for Startups terms
Committed use terms
Cookies
Data processing
HIPAA
Partner agreement
Partner program guide
Privacy policy
SLA
Terms of service
Terms of use

Send data from Akamai DataStream 2 to Axiom

This page explains how to stream Akamai CDN logs to Axiom with DataStream 2.

Akamai DataStream 2 collects raw request logs from Akamai edge servers, bundles them, and pushes them to a destination every 30 or 60 seconds. Use it to send CDN traffic logs to Axiom so you can query request volume, status codes, cache efficiency, and edge latency for your Akamai properties.

DataStream 2 can reach Axiom in two ways:

  • Custom HTTPS destination (recommended). DataStream 2 posts JSON logs directly to the Axiom ingest API. Each DataStream field becomes a field in Axiom, and you control the event timestamp. See Send logs with the custom HTTPS destination.
  • Splunk destination. DataStream 2 posts logs to the Axiom Splunk HEC compatible API. Use this method if your organization standardizes on the Splunk destination type. See Send logs with the Splunk destination.

Axiom recommends the custom HTTPS destination for the following reasons:

  • The custom HTTPS destination doesn’t let you set an Authorization custom header, but it supports Basic authentication. The Axiom ingest API accepts an API token as the Basic authentication password, so no proxy is needed.
  • The dataset name is part of the endpoint URL, and you can tell Axiom which field holds the event timestamp.
  • The Splunk destination only sends to the HEC raw endpoint (/services/collector/raw), not to the HEC event endpoint. The raw endpoint doesn’t carry an envelope with event metadata such as time.

Prerequisites

  • Create an Axiom account.
  • Create a dataset in Axiom where you send your data.
  • Create an API token in Axiom with permissions to ingest data to the dataset you have created.
  • Have an Akamai account with access to DataStream 2 and at least one property that’s active on the Akamai network. For more information, see Create a stream in the Akamai documentation.
Info

Replace AXIOM_DOMAIN with the base domain of your edge deployment. For more information, see Edge deployments.

Replace API_TOKEN with the Axiom API token you have generated. For added security, store the API token in an environment variable.

Replace DATASET_NAME with the name of the Axiom dataset where you send your data.

Send logs with the custom HTTPS destination

  1. In Akamai Control Center, create a stream or edit an existing one. For more information, see Create a stream in the Akamai documentation.

  2. In the Data sets step, select the fields you want to send. Recommended: Include at least reqTimeSec, reqHost, reqMethod, reqPath, statusCode, cliIP, cacheStatus, and turnAroundTimeMSec. For the full list, see Data set parameters in the Akamai documentation.

  3. In Log format, select JSON.

  4. In the Delivery step, select Custom HTTPS as the destination, and then configure it with the following values. For more information about each field, see Stream logs to a custom HTTPS endpoint in the Akamai documentation.

    FieldValue
    NameA name for the destination, for example Axiom.
    Endpoint URLhttps://AXIOM_DOMAIN/v1/ingest/DATASET_NAME?timestamp-field=reqTimeSec
    AuthenticationBasic
    Usernameaxiom. Axiom ignores the username.
    PasswordAPI_TOKEN
    Send compressed dataOptional: Select to send gzip-compressed requests.
    Content type (in Custom header)application/json
  5. Set Push frequency to 30 or 60 seconds.

  6. Click Validate & Save. DataStream 2 sends the test event {"access_validation":true} to Axiom. If the request succeeds, the test event appears in your dataset.

  7. Activate the stream. For streams that use the DataStream behavior, enable the behavior on your property in Property Manager. For more information, see DataStream behavior in the Akamai documentation.

The timestamp-field=reqTimeSec query parameter tells Axiom to use the time when the Akamai edge server accepted the request as the event’s _time. If you omit it, Axiom uses the time it received the batch, which is up to one push interval later than the request. For more information, see Requirements for timestamp field.

Info

If you use an IP allowlist on your side, see the Akamaized hostname option in Stream logs to a custom HTTPS endpoint. Axiom’s ingest endpoints don’t require it.

Send logs with the Splunk destination

The Axiom Splunk HEC compatible API is served from hec.AXIOM_DOMAIN. The DataStream 2 Splunk destination only accepts URLs that end in the HEC raw path, so use /services/collector/raw.

  1. Create an Axiom API token that can ingest into only one dataset: the dataset where you want to send Akamai logs. Axiom then routes events to that dataset without an index parameter. For more information, see Choose the target dataset.

  2. In Akamai Control Center, create a stream or edit an existing one, and select the data set fields you want to send.

  3. In Log format, select JSON.

  4. In the Delivery step, select Splunk as the destination, and then configure it with the following values. For more information about each field, see Stream logs to Splunk in the Akamai documentation.

    FieldValue
    Display nameA name for the destination, for example Axiom.
    Endpoint URLhttps://hec.AXIOM_DOMAIN/services/collector/raw
    Event collector tokenAPI_TOKEN
    Send compressed dataOptional: Select to send gzip-compressed requests.
  5. Set Push frequency to 30 or 60 seconds.

  6. Click Validate & Save, and then activate the stream.

With this method, Axiom assigns _time from the time it receives each batch because the HEC raw endpoint has no time envelope field. To use the request time instead, use the custom HTTPS destination.

Field mapping

DataStream 2 sends each log line as a flat JSON object. Axiom stores each key as a top-level field with the same name. The following table lists commonly used fields. For the full list, see Data set parameters in the Akamai documentation.

DataStream 2 fieldAxiom fieldDescription
reqTimeSecreqTimeSec and, with timestamp-field=reqTimeSec, _timeTime when the edge server accepted the request, in Unix epoch seconds.
reqIdreqIdRequest ID assigned by the edge server.
cpcpCP code of the property.
streamIdstreamIdID of the stream that sent the log line.
reqHostreqHostValue of the Host request header.
reqMethodreqMethodHTTP request method.
reqPathreqPathRequest path without the query string.
queryStrqueryStrQuery string of the request.
statusCodestatusCodeHTTP response status code. 0 means the client closed the connection before the response.
bytesbytesSize of the response body in bytes.
totalBytestotalBytesBilled inbound and outbound bytes.
cliIPcliIPClient IP address.
UAUAURI-encoded User-Agent request header.
protoprotoProtocol, for example HTTP/2.
tlsVersiontlsVersionTLS version, or - for requests without TLS.
cacheStatuscacheStatus1 if the object was in the edge cache, 0 otherwise.
turnAroundTimeMSecturnAroundTimeMSecMilliseconds from the last request header to the first response byte.
transferTimeMSectransferTimeMSecMilliseconds to send the response.
errorCodeerrorCodeDescription of the error that occurred when serving the request, if any.
country, state, citycountry, state, cityLocation where the request originated.
edgeIPedgeIPIP address of the edge server that served the request.

Keep the following in mind when you query DataStream 2 data:

  • DataStream 2 encodes most values as JSON strings, including numeric values such as statusCode, bytes, and turnAroundTimeMSec. Convert them with toint or todouble before numeric comparisons and aggregations.
  • In JSON logs, DataStream 2 omits fields that have no value. Use isnotempty to filter on fields that aren’t always present.
  • The Akamai documentation spells the request ID field reqId in the log format sample and reqID in the data set parameter list. Check the field name in your dataset before you query it.
  • The Validate & Save test event creates a field named access_validation. To exclude the test event from queries, filter with where isnull(access_validation).

Query DataStream 2 logs

The following query counts requests by status code for each host:

APL
['DATASET_NAME']
| summarize count() by reqHost, statusCode

The following query calculates the cache hit ratio and the 95th percentile of edge turnaround time per host:

APL
['DATASET_NAME']
| extend hit = toint(cacheStatus), tat = todouble(turnAroundTimeMSec)
| summarize hit_ratio = avg(hit), p95_tat_ms = percentile(tat, 95) by reqHost

The following query lists the paths with the most server errors:

APL
['DATASET_NAME']
| where toint(statusCode) >= 500
| summarize errors = count() by reqHost, reqPath
| top 10 by errors

Troubleshooting

  • If Validate & Save fails with a 401 or 403 error, check that the password (custom HTTPS) or event collector token (Splunk) is a valid Axiom API token that can ingest into the target dataset.
  • If events arrive but _time matches the ingest time, check that the endpoint URL includes ?timestamp-field=reqTimeSec.
  • If events don’t arrive after you activate the stream, check that the DataStream behavior is enabled on the active version of your property. For more information, see DataStream behavior in the Akamai documentation.

For more information about ingest limits, see Limits.

Was this page helpful?
Suggest edits on GitHub
On this page
Send logs with the custom HTTPS destinationSend logs with the Splunk destinationField mappingQuery DataStream 2 logsTroubleshooting