Add a Splunk connector
Add a Splunk connector so Harness can fetch logs from your Splunk deployment for verification.
Splunk is a data platform that collects, indexes, and searches machine data such as application logs and events, available as Splunk Enterprise (self-hosted) and Splunk Cloud Platform. Add a Splunk connector in Harness to let your pipelines run searches against your Splunk logs. Harness can then use that data in Continuous Verification to compare log patterns and detect anomalies after a deployment, helping you confirm a release is healthy or trigger a rollback.
Go to Overview for information about all monitoring and logging connectors, such as scopes and delegate selection.
What you will learn from this topic
How to configure the role capabilities that the Splunk account needs.
How to add a Splunk connector to a Harness project.
How to configure the credentials for Splunk and choose the delegates that verify the connection.
Before you begin
Splunk REST API access: A non-SAML Splunk account with access to the REST API on the Splunk server.
Harness permissions: Permission to create connectors and secrets in Harness.
Splunk account permissions
Splunk APIs require you to authenticate with a non-SAML account. To access your Splunk Cloud deployment using the Splunk REST API and SDKs, submit a support case requesting access on the Splunk Support Portal.
Managed deployments: Splunk Support opens port 8089 for REST access. You can specify a range of IP addresses for controlled access to the REST API.
Self-service deployments: Splunk Support defines a dedicated user and sends you credentials that enable that user to access the REST API.
Go to Using the REST API with Splunk Cloud in the Splunk documentation for details.
The Splunk user account that authenticates Harness must belong to a role with the following capabilities:
Search: Permission to run searches.
Index access: Access to the indexes you want to search.
The following example shows a Splunk role named Harness User that has the search capability.

The example role has access to All non-internal indexes. You can restrict the role to only the relevant indexes.

Add a Splunk connector
You can add a Splunk connector at the project, org, or account scope. This procedure covers the project scope, and the process is the same for org and account scope.
Open your Harness project.
In Project Settings, select Connectors.
Click New Connector, then select Splunk under Monitoring and Logging Systems. The Splunk connector settings appear.
Overview
Configure the identity fields for the connector.
In Name, enter a name for the connector. Harness generates the Id from the name.
Optionally, add a Description and Tags.
Click Continue.

Credentials
Configure the following settings:
In URL, enter the URL to access the REST API on the Splunk server, including the port number. The default port is 8089. For example,
https://deployment-name.cloud.splunk.com:8089orhttps://mycompany.splunkcloud.com:8089.In Authentication, select one of the following options:
Username and Password:
In Username, enter the username of your Splunk account.
In Password, select or create a Harness encrypted text secret to store your password.
Bearer Token (HTTP Header): A bearer token is an authentication token you send in the HTTP
Authorizationheader, instead of a username and password, when calling the REST API. Select or create a Harness encrypted text secret to store the authentication token.No Authentication: Connect without credentials. Use this option only when your Splunk server does not require authentication.
HEC Authentication: An HEC token is the credential for Splunk’s HTTP Event Collector (HEC). HEC lets you send data and application events to a Splunk deployment over HTTP or HTTPS. Select or create a Harness encrypted text secret to store the HEC token.
Click Connect and Save.

Delegates Setup
Select one of the following options:
Use any available Delegate: Harness selects an available delegate at runtime.
Only use Delegates with all of the following tags: Enter the tags of the delegates Harness must use with this connector.
The Test Delegate Connectivity list shows the delegates that match your selection. To add a delegate, click Install new Delegate.
Click Save and Continue.

Verify Connection
Click Finish after the connection test succeeds. The connector is listed in Connectors page.
Sample YAML
The following example shows a YAML for the Splunk connector created in this topic.
For the full connector YAML schema, including how to skip connector preflight checks, go to Create a connector using YAML.
Next steps
Use delegate selectors: Control which delegates can connect to this connector.
Add a text secret: Store the Splunk password as a Harness secret.
Last updated
Was this helpful?