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
Annotate
Monitor
Overview
View status
Configure
Examples
Monitor types
Anomaly
Match
Threshold
Alerting
Overview
Configure
Notifier types
Custom Webhook
Discord
Email
Microsoft Teams
Opsgenie
PagerDuty
Slack
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 Axiom 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 Splunk to Axiom

Integrate Axiom in your existing Splunk app with minimal effort and without breaking any of your existing Splunk stack.

This page explains how to send data from Splunk forwarders and Splunk logging libraries to Axiom.

Axiom provides a Splunk HEC compatible API on your edge deployment. Any tool that sends data to a Splunk HTTP Event Collector (HEC) can send the same data to Axiom without changes to its code.

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.

Configure Splunk clients

In your Splunk forwarder or HEC client, specify the following:

  • The HEC URL is https://hec.AXIOM_DOMAIN/services/collector/event?index=DATASET_NAME. For raw text payloads, use https://hec.AXIOM_DOMAIN/services/collector/raw?index=DATASET_NAME.
  • The HEC token is your Axiom API token. The API accepts Authorization: Splunk API_TOKEN, Authorization: Bearer API_TOKEN, and HTTP basic authentication.
  • Optional: If your client sets the index field on events instead of in the URL, Axiom sends each event to the dataset with that name.

For the full description of the API, including envelope fields and response codes, see Send data to Axiom using the Splunk HEC API.

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.

Examples

Send logs from JavaScript using splunk-logging

javascript
var SplunkLogger = require('splunk-logging').Logger;

var config = {
  token: 'API_TOKEN',
  url: 'https://hec.AXIOM_DOMAIN:443/services/collector/event?index=DATASET_NAME',
};

var Logger = new SplunkLogger(config);

var payload = {
  // Message can be anything; doesn’t have to be an object
  message: {
    temperature: '70F',
    chickenCount: 500,
  },
};

console.log('Sending payload', payload);
Logger.send(payload, function (err, resp, body) {
  // If successful, body will be { text: 'Success', code: 0 }
  console.log('Response from Axiom', body);
});

Send logs from Python using splunk_handler

python
import logging
from splunk_handler import SplunkHandler
splunk = SplunkHandler(
        host='hec.AXIOM_DOMAIN',
        port='443',
        protocol='https',
        token='API_TOKEN',
        index='DATASET_NAME'
    )

logging.getLogger('').addHandler(splunk)

logging.warning('Hello from Axiom!')

Send logs from Go using net/http

go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"time"
)

func main() {
	event := map[string]any{
		"time":       time.Now().Unix(),
		"sourcetype": "httpevent",
		"event": map[string]any{
			"message": "hello from Axiom",
			"level":   "info",
		},
	}
	body, _ := json.Marshal(event)

	req, _ := http.NewRequest(http.MethodPost, "https://hec.AXIOM_DOMAIN/services/collector/event?index=DATASET_NAME", bytes.NewReader(body))
	req.Header.Set("Authorization", "Splunk API_TOKEN")
	req.Header.Set("Content-Type", "application/json")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	fmt.Println(resp.Status)
}
Was this page helpful?
Suggest edits on GitHub
On this page
Configure Splunk clientsExamplesSend logs from JavaScript using splunk-loggingSend logs from Python using splunk_handlerSend logs from Go using net/http