Skip to content

Splunk

The audit log belongs in the Splunk platform (Enterprise or Cloud Platform), where Enterprise Security also runs. Splunk Observability Cloud documents OTLP ingest for traces and metrics, not logs, and its Log Observer Connect reads logs stored in the Splunk platform, so audit records go to an index. Use one of these routes.

Route 1: Universal Forwarder tailing the files

Section titled “Route 1: Universal Forwarder tailing the files”

inputs.conf on the forwarder:

[monitor:///opt/artex/data/audit/target.jsonl]
sourcetype = artex:target
index = artex
ignoreOlderThan = 7d
[monitor:///opt/artex/data/audit/agent.jsonl]
sourcetype = artex:agent
index = artex
ignoreOlderThan = 7d

The forwarder recognizes files by a CRC of their first 256 bytes. ARTEX rotates by rename (target.jsonl to target.jsonl.<UTC time>) and starts every line with a unique time and log.record.uid, so a renamed file is recognized rather than indexed twice. Monitor the active files by name. If you monitor the audit directory instead, add whitelist = \.jsonl$: the forwarder reads gzipped files, and ARTEX gzips older generations (target.jsonl.<UTC time>.gz), which would then be indexed a second time. Give the anthropic stream its own index if you ingest it, so retention and role access can differ.

props.conf for the sourcetypes, in an add-on installed on search heads and indexers:

[artex:target]
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+)
TIME_PREFIX = "time":"
MAX_TIMESTAMP_LOOKAHEAD = 40
KV_MODE = json
FIELDALIAS-artex_cim = server.address AS dest server.port AS dest_port http.request.method AS http_method url.full AS url http.response.status_code AS status http.request.body.size AS bytes_out http.response.body.size AS bytes_in artex.identity AS user
EVAL-app = "artex"
[artex:agent]
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+)
TIME_PREFIX = "time":"
MAX_TIMESTAMP_LOOKAHEAD = 40
KV_MODE = json
FIELDALIAS-artex_cim = artex.identity AS user
EVAL-app = "artex"

Use search-time KV_MODE = json or forwarder-side INDEXED_EXTRACTIONS = json, not both, or fields are extracted twice. Note the byte direction: CIM bytes_out is client to server, the request body.

eventtypes.conf and tags.conf, so CIM Web and Alerts searches find the data:

# eventtypes.conf
[artex_web]
search = sourcetype="artex:target" event_name="artex.http"
[artex_alert]
search = sourcetype="artex:*" event_name="artex.alert"
# tags.conf
[eventtype=artex_web]
web = enabled
proxy = enabled
[eventtype=artex_alert]
alert = enabled

The collector tails the files and sends to HEC. It sets the HEC sourcetype and index from artex.stream with a transform, so ARTEX never emits Splunk-specific com.splunk.* attributes.

receivers:
file_log/artex:
include:
- /artex/audit/target.jsonl
- /artex/audit/agent.jsonl
start_at: beginning
storage: file_storage
operators:
- type: json_parser
parse_to: attributes
timestamp:
parse_from: attributes.time
layout_type: gotime
layout: "2006-01-02T15:04:05.999999999Z07:00"
severity:
parse_from: attributes.severity_text
extensions:
file_storage:
directory: /var/lib/otelcol/storage
create_directory: true
processors:
batch: {}
# Pick the HEC sourcetype and index from the ARTEX stream, here in the collector.
transform/splunk_meta:
log_statements:
- context: log
statements:
- set(log.attributes["com.splunk.sourcetype"], Concat(["artex", log.attributes["artex.stream"]], ":"))
- set(log.attributes["com.splunk.index"], "artex")
exporters:
splunk_hec/logs:
token: "${env:SPLUNK_HEC_TOKEN}"
endpoint: "${env:SPLUNK_HEC_URL}/services/collector"
source: artex-cc
service:
extensions: [file_storage]
pipelines:
logs:
receivers: [file_log/artex]
processors: [transform/splunk_meta, batch]
exporters: [splunk_hec/logs]

The sourcetypes it produces are artex:target and artex:agent, matching the add-on above.

sinks:
splunk_target:
type: splunk_hec_logs
inputs: [artex_by_stream.target]
endpoint: "${SPLUNK_HEC_URL}"
default_token: "${SPLUNK_HEC_TOKEN}"
index: artex
sourcetype: "artex:target"
encoding:
codec: json
splunk_agent:
type: splunk_hec_logs
inputs: [artex_by_stream.agent]
endpoint: "${SPLUNK_HEC_URL}"
default_token: "${SPLUNK_HEC_TOKEN}"
index: artex
sourcetype: "artex:agent"
encoding:
codec: json

One sink per stream gives the artex:target and artex:agent sourcetypes the add-on above expects. Use with the Vector base config.

# ARTEX alerts, high and critical
index=artex event_name="artex.alert" "artex.alert.severity" IN (high, critical)
| table _time security_rule.name artex.alert.severity user server.address body
# Hosts contacted per attribution tag, 5-minute buckets
index=artex sourcetype="artex:target" event_name="artex.http"
| timechart span=5m dc(dest) by user
# A stream went quiet: no heartbeat in five minutes (the default interval is 60 seconds)
index=artex event_name="artex.heartbeat" earliest=-1h
| stats latest(_time) as last by sourcetype
| where last < relative_time(now(), "-5m")
# Lost records: a gap in artex.seq within one serve process and stream
index=artex
| stats min(artex.seq) as first max(artex.seq) as last dc(artex.seq) as seen by service.instance.id artex.stream
| where last - first + 1 > seen

On artex:target, user is the claimed label of an attribution tag. Each web UI chat conversation’s claude and its Bash commands carry their own chat/<conversation id> tag and capture_command_output carries artex/exec, so the per-tag search separates chat conversations, ARTEX’s other clients and sessions you tagged yourself; user="chat/*" matches every chat conversation. On artex:agent, user on a tool call or audit.tamper alert is the caller’s verified identity when it has one. The gap search counts within the search window, so a gap at its edge shows up only in a window that covers both sides.

In Enterprise Security 8, one event-based detection over tag=alert app=artex can map artex.alert.severity to a risk score, with user as the risk object where the alert carries one.

  • HEC from ARTEX’s HTTP sink (#386). For small setups with no forwarder, the sink would post NDJSON to HEC’s raw endpoint (/services/collector/raw?sourcetype=artex:target&index=artex), where each line becomes one event, with Authorization: Splunk <token> and an X-Splunk-Request-Channel header. Splunk Enterprise listens on port 8088 by default; paid Splunk Cloud Platform stacks use 443 on http-inputs-<stack>.splunkcloud.com. Indexer acknowledgment is not supported for generic clients on Splunk Cloud Platform, so the sink would treat a 2xx as delivered.
  • Metrics (#396). Route 2 could add a prometheus receiver for ARTEX’s /metrics and a splunk_hec exporter to a metrics index, or ARTEX could send OTLP metrics to Observability Cloud with an X-SF-Token header.
  • Splunk OTel Collector config: otelcol validate from quay.io/signalfx/splunk-otel-collector 0.165.1 passed with placeholder endpoints.
  • Vector sink: vector validate 0.62.0 passed, see Vector.
  • inputs.conf, props.conf, eventtypes.conf, tags.conf and the SPL were written from Splunk documentation only and have not been loaded into a Splunk instance.