For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a Splunk Logs health source for AI Verify

Connect Splunk to AI Verify (v2) to collect and analyze logs during deployments using manual SPL queries.

AI Verify (v2) supports a Splunk Logs health source type that lets you connect a Splunk connector to your deployment pipeline and analyze logs during deployment verification. Splunk currently supports the Logs feature only; metrics-based analysis for Splunk is not yet available. You configure a Splunk Logs health source using Manual Setup, where you write the Splunk SPL query yourself and map the fields the AI analysis engine needs.

What you will learn from this topic


Before you begin


Create a Splunk Logs health source

Navigate to Account/Org/Project Settings, then select Health Sources from the left navigation. Click + New Health Source to open the configuration wizard.

1

Configure the overview

On the Overview tab, provide the basic health source details.

Click to view full size image
  1. Enter a Health Source Name, for example, splunk-prod-logs.

  2. In Select health source type, select the Splunk tile.

  3. In Select Connector, choose the Splunk connector that points to your Splunk instance.

  4. In Select Feature, the dropdown shows Logs as the only option. Metrics analysis is not yet supported for Splunk.

  5. Under Setup Approach, select Manual Setup. AI-assisted setup is not currently available for Splunk Logs health sources.

  6. Click Continue.

2

Define the query specification

The Query Specifications tab is where you configure the SPL query that fetches logs from Splunk. Each health source can have one or more named queries.

The left panel lists your queries. Click + Add Query to add additional queries. Select a query in the list to edit its settings in the right panel.

Query Name and identifier

Enter a human-readable Query Name, for example, Checkout Service Errors. Harness derives the query identifier automatically. The identifier must be unique within the health source.

Select Query (Optional)

If you have existing saved searches in Splunk, use the Select Query (Optional) dropdown to choose one. Selecting a saved search populates the SPL query field with that search's query and resets the Timestamp Identifier and Message Identifier fields to their defaults. This step is optional; you can skip it and write an SPL query directly.

SPL query

Enter a Splunk SPL query that returns raw log events. The query must follow these rules:

  • Do not start the query with the search command.

  • Do not use transforming commands such as stats, timechart, chart, top, or rare.

  • Do not include earliest=, latest=, or | head in the query.

The response must be an array of individual event objects, not aggregated results, so Harness can map identifiers from each event.

Click Fetch records to run the query against your Splunk connector. Harness displays the returned events as a list of JSON objects in the Records section.

3

Map log fields

After the query returns records, map the three identifiers the AI analysis engine needs. Each field takes an absolute path from the root of a record, written in bracket notation: object keys in single quotes and array positions as numbers, with segments joined by dots. For example, ['_raw'].

Field
Required
Default
Description

Timestamp Identifier

Yes

['_time']

Path to the event timestamp

Service Instance Identifier

Yes

None

Path to the field that identifies which service instance produced the log

Message Identifier

Yes

['_raw']

Path to the raw log message text

To select a path interactively, click the + icon next to a field. A path picker opens, showing the parsed record returned by Fetch records. Click any value in the tree to fill in its path. You can also type the path directly, but it must use the bracket notation shown above.

4

Save the health source

Click Save to create the health source. The health source appears on the Health Sources listing page with a Log signal-type badge and Splunk as the type.

The health source is now ready to reference in an AI Verify (v2) step.


Add multiple queries

Splunk Logs health sources support multiple queries within a single health source. You might add multiple queries to cover different log streams from the same Splunk connector, for example, one query for error logs and another for application logs.

In the Query Specifications tab, click + Add Query to add a new query entry in the left panel. Each query has its own name, SPL query, and field mapping. All queries in the health source run as part of the same AI Verify step execution.


Use the health source in an AI Verify pipeline

Reference the Splunk Logs health source by its identifier in the AIVerifyNG step. During execution, the step first fetches baseline logs using the saved SPL query, then fetches post-deployment (canary) logs during the deployment window, and submits both sets to the AI analysis engine for comparison.

Kubernetes rolling deployment with Splunk Logs health source: full YAML

View analysis results

After the pipeline runs, click the AI Verify step in the execution view. The Analysis tab shows a result for the Splunk Logs health source. Click the health source entry to see its Query Summaries section, which lists each query with a healthy or unhealthy badge.

When a query is marked unhealthy, the analysis displays a summary of the detected anomalous log patterns and a root cause hypothesis. This output is generated by the AI analysis engine, which compares the baseline log window against the post-deployment log window.

The Logs tab in the execution view shows the raw plugin output, including the baseline log fetch, the canary (post-deployment) log fetch, and the call to the AI Verify agent that produces the health summary.


Next steps

Last updated

Was this helpful?