Skip to main content

Cotool + Splunk

Connect Splunk to Cotool so agents discover indexes and sourcetypes, run SPL search jobs over explicit time ranges, and manage saved-search detections.

SIEM & Data Lake
Updated

The short answer

The Splunk integration lets Cotool agents investigate and hunt in data that stays in Splunk: they list indexes and sourcetypes, check a sourcetype's real field names, run SPL search jobs, page through results, and list or create saved searches as detections.[1]

How it connects: Cotool calls the Splunk REST API on the management port (usually 8089) with a Splunk authentication token. Every search runs as the Splunk user the token belongs to, so that user's roles decide which indexes Cotool can search.[1][7]

What Cotool uses from Splunk

Indexes and sourcetypes
Agents list indexes and sourcetypes, then describe a sourcetype's exact field names, types, and example values before writing SPL, so queries use fields that exist.[1]
Search jobs
Ad-hoc searches run as Splunk search jobs through the search/jobs REST endpoints, over explicit time ranges, and return results a page at a time.[1][7]
Saved searches
Saved searches are Splunk's scheduled detections. Agents list them across all apps or within one app, and can create new ones with scheduling and alerting settings.[1][7]
Installed apps
Agents list installed Splunk apps with their author, version, and state, which tells them which add-ons parse a data source.[1]

Response actions

These change state in Splunk, so they are the steps teams usually gate behind approval.

Create a saved-search detection
splunk_createDetection is the one Splunk tool that changes your Splunk configuration. Every other Splunk tool reads data or settings.[1]

Detections, hunts, and triage

Triage an alert against Splunk historyTriage
A response agent receives an alert, searches the named Splunk indexes for the same user, host, or IP over a bounded window, and attaches the matching events to its verdict. Searches that hit the timeout you set return the results found so far instead of running on.[1][4]
Hunt across Splunk and the tools around itHunt
Federated search lets an agent answer one question from several places: logs stored in Cotool, Splunk queried in place, a data lake, and an EDR API. Splunk stays the system of record for what it already holds.[2]
Write a detection without migrating itDetection
Cotool detections are Python and can run directly against the tools where data lives, so a detection can read Splunk without the source being re-ingested. Detections that should stay native can be created as Splunk saved searches.[1][3]

Example query

A bounded SPL search an agent might runspl
index=okta sourcetype="OktaIM2:log" TERM(203.0.113.24) earliest=-24h latest=now
| stats count min(_time) as first max(_time) as last by actor.alternateId, eventType
| sort - count

Cotool rejects searches over index=* and leading wildcards such as field=*value, because both are slow on large deployments. Agents name concrete indexes and use TERM() for exact values such as IP addresses. Replace the index and sourcetype with your own.[1]

Setup and permissions

Create a Splunk authentication token in Splunk Web under Settings > Tokens for a dedicated, non-admin user with search access to the indexes you need. Token authentication must be enabled first. Splunk shows the token once.[1][6]

PermissionAccess
searchThe capability that lets a user run SPL searches. Every Cotool search runs as the token's user.[1][8]Read
srchIndexesAllowedThe role setting that lists which indexes its users may search. Limit it to the indexes Cotool needs.[1][8]Read
Create saved searches (optional)Detections are created through Splunk's saved/searches endpoint. Leave this out if agents should only read.[1][7]Write
  • Static Splunk tokens can be set to expire at an absolute or relative time; set an expiry and rotate the token before it lapses.[6]
  • In Cotool, the Splunk base URL is your Splunk host with the management port, such as https://<host>:8089, and the token is pasted without a Bearer or Splunk prefix.[1]

How Cotool works with Splunk

  • After you connect, and weekly after that, Cotool maps your Splunk environment: indexes, the sourcetypes in each, their key fields, and sample rows. Agents use the map to choose where to search.[1]
  • If a log source is also ingested into Cotool Logs, agents query it there and use Splunk for data only Splunk holds, or when you ask for Splunk.[1]
  • Cotool positions agent queries against your existing tools as a way to send the SIEM only what your detections need, rather than everything you might want to investigate.[5]

FAQ

Does Cotool need a Splunk admin account?
No. Cotool's Splunk documentation says to create the token for a dedicated user with search access to the indexes Cotool needs, not an admin account. That user's roles decide what Cotool can search.[1]
Do I have to move data out of Splunk to use Cotool?
No. Cotool agents query Splunk in place through its REST API, and Cotool detections can run against federated sources without ingesting them. You can still store other sources in Cotool Logs.[1][3]

Sources

  1. Splunk Integration (Cotool docs) · accessed November 16, 2026
  2. Log storage optimized for agents (Cotool Observe) · accessed November 16, 2026
  3. Detections are code (Cotool Detect) · accessed November 16, 2026
  4. Respond to every signal (Cotool Respond) · accessed November 16, 2026
  5. An AI SOC built on the open agent platform (Cotool) · accessed November 16, 2026
  6. Create authentication tokens (Splunk Enterprise docs) · accessed November 16, 2026
  7. Search endpoint descriptions (Splunk REST API reference) · accessed November 16, 2026
  8. Define roles on the Splunk platform with capabilities (Splunk docs) · accessed November 16, 2026

Related integrations

All integrations

Use cases with Splunk

Related reading

Attackers are scaling with tokens

Cotool helps defenders operate at machine speed. See how security teams are scaling Detection & Response.

Book a demo