Send data to Axiom from products with a Splunk HEC destination
This page explains how to send data to Axiom from SaaS products, security tools, and agents that offer a Splunk HTTP Event Collector (HEC) destination.
Many SaaS products, security tools, and agents can stream data to Splunk but to no other observability platform. Axiom offers a Splunk HTTP Event Collector (HEC) compatible API, so you can point these Splunk destinations at Axiom instead.
To send data from Splunk forwarders, logging libraries, or your own code, see Send data with the Splunk HEC API.
This page explains the values to enter in a Splunk HEC destination, and then lists the settings for specific products.
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.
Values for a Splunk HEC destination
Most Splunk HEC destinations ask for some of the following values. Enter the Axiom values instead of your Splunk values:
| Splunk field | Axiom value |
|---|---|
| Host, domain, or HEC host | hec.AXIOM_DOMAIN |
| Port | 443 |
| Protocol or SSL | HTTPS. Keep certificate verification turned on. |
| Full URL | https://hec.AXIOM_DOMAIN/services/collector/event |
| Full URL for raw (non-envelope) payloads | https://hec.AXIOM_DOMAIN/services/collector/raw |
| HEC token | API_TOKEN |
| Index | DATASET_NAME |
| Indexer acknowledgment | Turned off |
When the product only asks for a host, it adds the path itself. Axiom accepts the /services/collector, /services/collector/event, and /services/collector/raw paths. For more information about these paths, the event envelope, and response codes, see Send data with the Splunk HEC API.
Choose the target dataset
Axiom routes each request to a single dataset. It uses the first of the following that's available:
- The
indexquery parameter of the URL, for examplehttps://hec.AXIOM_DOMAIN/services/collector/event?index=DATASET_NAME. - The
indexfield of the first event in the request. - The dataset of the API token, if the token can ingest into exactly one dataset.
Many products don’t have an index field and don’t let you add a query parameter to the URL. For these products, create a basic API token and give it access to only the target dataset. A token with access to more than one dataset, or to all datasets, doesn’t select a dataset, and Axiom rejects the request with HEC code 7 (incorrect index).
Recommended: Create a separate dataset and a separate single-dataset token for each product. This keeps unrelated data apart and lets you revoke one product’s access without affecting the others.
Limitations
If a product depends on one of the following Splunk HEC features, it can’t send data to Axiom through its Splunk destination:
- Port
8088. Axiom only accepts HTTPS on port443. - The versioned
/services/collector/event/1.0and/services/collector/raw/1.0paths. - Indexer acknowledgment and the
/services/collector/ackpath.
For more information, see Limitations of the Splunk HEC API.
Product settings
The sections below list the settings for products that offer a Splunk HEC destination. The settings are based on the documentation of each product at the time of writing.
| Product | Path the product sends to | How to choose the dataset |
|---|---|---|
| GitHub Enterprise audit log streaming | Added by GitHub | Single-dataset token |
| Vercel Audit Log Drains | Added by Vercel | Single-dataset token |
| Fleet | /services/collector/event | splunk.index setting |
| LiveKit Cloud log drains | Added by LiveKit | SPLUNK_INDEX secret |
| Home Assistant | /services/collector/event | Single-dataset token |
| Ansible | You enter the full URL | index query parameter |
| Kong Gateway | You enter the full URL | Single-dataset token |
| Bitwarden | You enter the full URL | index query parameter |
| Fastly | You enter the full URL | index field in the log format |
| Akamai DataStream 2 | /services/collector/raw | Single-dataset token |
Docker splunk logging driver | /services/collector/event/1.0 | Not supported |
GitHub Enterprise audit log streaming
GitHub Enterprise Cloud and GitHub Enterprise Server can stream the enterprise audit log to a Splunk HEC endpoint. GitHub has no index field, so use a single-dataset token.
- In your enterprise settings, go to Audit log > Log streaming, click Configure stream, and then click Splunk.
- In Domain, enter
hec.AXIOM_DOMAIN. - In Port, enter
443. - In Token, enter an Axiom API token that can only ingest into the target dataset.
- Keep Enable SSL verification selected.
- Click Check endpoint. GitHub checks the endpoint at
hec.AXIOM_DOMAIN:443/services/collector. - Click Save.
For more information, see the GitHub documentation on streaming the audit log for your enterprise (Enterprise Cloud) and the Enterprise Server equivalent.
Vercel Audit Log Drains
Vercel Audit Log Drains can forward team audit events to Splunk. Audit Log Drains are available on the Vercel Enterprise plan. Vercel has no index field, so use a single-dataset token.
- In Vercel, create a drain, select Audit Log as the data type, and then select Splunk as the destination.
- In HEC host, enter
hec.AXIOM_DOMAIN. Don’t add a port. - In HEC token, enter an Axiom API token that can only ingest into the target dataset.
- Click Test to send an example event. A successful test returns a
2xxresponse.
Vercel sends each audit event in a HEC envelope with source set to vercel and sourcetype set to vercel:audit_log.
For more information, see the Vercel documentation on draining audit logs to Splunk and the audit log format.
Vercel doesn’t offer a Splunk destination for runtime logs, traces, or analytics. To send these to Axiom, use the Axiom Vercel app.
Fleet
Fleet can send osquery result logs, osquery status logs, and Fleet activity audit logs to Splunk with its splunk log destination plugin. osquery itself has no Splunk logger plugin.
Only self-hosted Fleet users can change log destinations. If you use Fleet’s managed cloud, contact Fleet to change the configuration.
In the Fleet server configuration, set the following:
Enter the base URL without a trailing slash or query parameters. Fleet appends /services/collector/event to the value of url, so a query parameter in url produces an invalid request path. Use the index setting to choose the dataset.
For more information, see the Fleet documentation on log destinations and the Splunk server configuration.
LiveKit Cloud log drains
LiveKit Cloud can forward agent logs to Splunk. Configure the destination with agent secrets:
LiveKit’s documentation describes SPLUNK_HEC_URL as the endpoint URL including the port, and doesn’t say which path LiveKit adds to it. If LiveKit sends data to a path that Axiom doesn’t serve, logs don’t arrive in Axiom.
For more information, see the LiveKit documentation on log drains.
Home Assistant
The Home Assistant Splunk integration sends state changes to /services/collector/event. It has no index field, so use a single-dataset token.
- In Home Assistant, go to Settings > Devices & services, click Add integration, and then select Splunk.
- In Host, enter
hec.AXIOM_DOMAIN. - In Port, enter
443. The default value8088doesn’t work with Axiom. - In Token, enter an Axiom API token that can only ingest into the target dataset.
- Keep SSL and Verify SSL turned on.
When you save the integration, Home Assistant sends an empty request to check the connection. Axiom answers with HEC code 5 (no data), which Home Assistant accepts.
For more information, see the Home Assistant documentation on the Splunk integration.
Ansible
The Ansible community.general.splunk callback plugin sends the results of tasks to the URL you specify. You enter the full URL, so you can choose the dataset with the index query parameter.
In ansible.cfg, set the following:
Alternatively, set the SPLUNK_URL and SPLUNK_AUTHTOKEN environment variables.
The callback doesn’t set the HEC time field, so Axiom uses the ingest time as the event timestamp. The task time is available in the timestamp field of the event.
For more information, see the Ansible documentation on the community.general.splunk callback.
Kong Gateway
Kong recommends its HTTP Log plugin for sending request logs to Splunk. Kong’s log entries aren’t HEC envelopes, so send them to the raw endpoint.
The HTTP Log plugin drops the query string from http_endpoint, so use a single-dataset token. Keep queue.max_batch_size at its default value 1. If you send batches, Kong sends a JSON array, and Axiom stores the array as a single raw text event instead of one event per log entry.
For more information, see the Kong documentation on the HTTP Log plugin and its Splunk example.
The community kong-splunk-log plugin also sends HEC envelopes to a full URL that you specify, so https://hec.AXIOM_DOMAIN/services/collector/event?index=DATASET_NAME works as its splunk_endpoint. However, the kong-splunk-log repository is archived, and the plugin doesn’t verify TLS certificates. Axiom recommends the HTTP Log plugin instead.
Bitwarden
Bitwarden Teams and Enterprise organizations can send event logs to any HEC endpoint with the Generic HEC integration. You enter the full URL, so you can choose the dataset with the index query parameter.
- In the Bitwarden Admin Console, go to Integrations, find Generic HEC under Event management, and then click Connect.
- In HTTP Event Collector URL, enter
https://hec.AXIOM_DOMAIN/services/collector/event?index=DATASET_NAME. - In HTTP Event Collector Token, enter your Axiom API token.
Bitwarden sends each event log entry as a HEC envelope, so use the /services/collector/event path. Axiom stores the fields inside event and the standard envelope fields, such as source. Axiom doesn’t store the other top-level fields that Bitwarden adds to the envelope, such as bw_serviceName and service. If you use the Splunk card instead of Generic HEC, its example URL ends in /services/collector/raw. Change it to /services/collector/event.
For more information, see the Bitwarden documentation on the HTTP Event Collector integration.
Fastly
Fastly real-time log streaming can send CDN and Compute logs to Splunk. In the Fastly Splunk logging endpoint, enter https://hec.AXIOM_DOMAIN/services/collector/event as the URL. Fastly’s example URL ends in /services/collector/event/1.0, which Axiom doesn’t serve.
For the full setup, including the recommended log format and how to choose the dataset, see Send data from Fastly to Axiom.
Akamai DataStream 2
Akamai DataStream 2 can send CDN logs to Splunk. DataStream 2 only accepts raw HEC endpoint URLs, so enter https://hec.AXIOM_DOMAIN/services/collector/raw as the endpoint URL and use a single-dataset token.
For the full setup, including the custom HTTPS destination that DataStream 2 also offers, see Send data from Akamai DataStream 2 to Axiom.
Docker splunk logging driver
The Docker Engine built-in splunk logging driver can’t send data to Axiom. The driver always sends logs to /services/collector/event/1.0, which Axiom doesn’t serve. It also rejects a splunk-url value that contains a path or query parameters. For the driver options, see the Docker documentation on the Splunk logging driver.
To send container logs to Axiom, use one of the methods described in Send data from Docker to Axiom.