Add an ElasticSearch connector
Add an ElasticSearch connector so Harness can use ElasticSearch as a verification provider.
Elasticsearch is a distributed search and analytics engine, commonly deployed as part of the ELK stack, that stores and searches large volumes of log and event data. Add an Elasticsearch connector in Harness to let your pipelines query your Elasticsearch 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 add an ElasticSearch connector to a Harness project.
How to configure the URL and authentication method that Harness uses to connect to ElasticSearch.
Before you begin
ElasticSearch access: The URL of your ElasticSearch server, and credentials for the authentication method you plan to use.
Harness permissions: Permission to create connectors and secrets in Harness.
Add an ElasticSearch connector
You can add an ElasticSearch connector at the project, org, or account scope. This procedure covers the project scope, and the process is the same for org and account.
Open your Harness project.
In Project Settings, select Connectors.
Click New Connector, then select ElasticSearch under Monitoring and Logging Systems. The ElasticSearch 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 of your ElasticSearch server.
In Authentication, select one of the following options:
Username and Password:
For Username, enter your ElasticSearch account username.
For Password, select or create a Harness encrypted text secret.
API Key:
API ID: Enter the public identifier for your Elasticsearch cluster.
API Key: Enter the corresponding API key string to authenticate the connection.
Bearer Token(HTTP Header): Authenticate with a bearer token sent in the HTTP header.
No Authentication: Connect without credentials. Use this option only when your ElasticSearch server does not require authentication.
Click Continue.

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.
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 ElasticSearch 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 ElasticSearch credentials as Harness secrets.
Last updated
Was this helpful?