Connect to Monitoring and Logging Systems

Updated 3 weeks ago by Renu Bhaskaran

Connect Harness to monitoring and logging systems by adding a verification provider Connector.

You can add a verification provider Connector inline when developing your pipeline, or separately in your Account/Org/Project's resources. Once you add the Connector, it is available in Pipelines of the same Account/Org/Project.

In this topic:

Monitoring and Logging Systems Scope

You can add a verification provider Connector at the Account/Org/Project scope.

This topic will explain how to add it at the Project scope. The process is same for Org and Account.

Step: Add AppDynamics

  1. Open a Harness Project.
  2. In Project Setup, click Connectors.
  3. Click + Connector, and click AppDynamics in Monitoring and Logging Systems. The AppDynamics Connector Details settings appear.

  1. In Name, enter a name for this connector. You will use this name when selecting the Verification Provider in Harness Environments and Workflows. If you plan to use multiple providers of the same type, ensure that you give each provider a different name.
  2. Click Continue.
  3. In the Controller URL field, enter the URL of the AppDynamic controller in the format:
    http://<Controller_Host>:<port>/controller
    For example:
    https://xxxx.saas.appdynamics.com/controller
  1. In the Account Name field, enter the name of AppDynamics account you want to use.
For Harness On-Prem, enter customer1.
  1. In the User Name and Password fields, enter the credentials to authenticate with the AppDynamics server. In the Password field, you can choose Create or Select a secret.
  2. Click Continue. The Setup Delegates settings appear.
  3. You can choose Connect via any available delegate or Connect only via delegates which has all of the following tags. If you select a Delegate, Harness will always use that Delegate for this Connector.
  4. Click Save and Continue.
  5. Once the Test Connection succeeds, click Finish. AppDynamics is listed under the list of Connectors.

Step: Add Prometheus

  1. Open a Harness Project.
  2. In Project Setup, click Connectors.
  3. Click + Connector, and click Prometheus in Monitoring and Logging Systems. The Prometheus Connector Details settings appear.

  1. In Name, enter a name for this connector. If you are going to use multiple providers of the same type, ensure that you give each provider a different name.
  2. Click Continue.
  3. In the URL field, enter the URL of your Prometheus account. You cannot use a Grafana URL.
You cannot use a Grafana URL.
  1. Click Next. The Setup Delegates settings appear.
  2. You can choose Connect via any available delegate or Connect only via delegates which has all of the following tags. If you select a Delegate, Harness will always use that Delegate for this Connector.
  3. Click Save and Continue.
  4. Once the Test Connection succeeds, click Finish. Prometheus is listed under the list of Connectors.

Step: Add New Relic

  1. Open a Harness Project.
  2. In Project Setup, click Connectors.
  3. Click + Connector, and click New Relic in Monitoring and Logging Systems. The New Relic Connector Details settings appear.
  1. In Name, enter a name for this connector. If you are going to use multiple providers of the same type, ensure you give each provider a different name.
  2. Click Continue.
  3. In the New Relic URL field, enter the URL of your New Relic account. 
  1. To get the New Relic Account ID for your New Relic account, copy the number after the /accounts/ portion of the URL in the New Relic Dashboard.
  2. In Encrypted API Key, you can choose Create or Select a secret.
For secrets and other sensitive settings, select or create a new Text Secret.

Enter the API key needed to connect with the server. For information on API keys, see Access to REST API keys from New Relic.

Log into New Relic. On the home page, click your account name, and then click Account Settings.

Click the left menu, under Integrations, click API keys.

The API keys are displayed.

An index of Admin user's API keys appears below the account's REST API key. The list includes the Admin's full name and the date their key was last used. You can view your own Admin user's API key: From the Admin index, select (Show key) for your name.

For information on API keys, see Access to REST API keys from New Relic.

  1. Click Continue. The Setup Delegates settings appear.
  2. You can choose Connect via any available delegate or Connect only via delegates which has all of the following tags. If you select a Delegate, Harness will always use that Delegate for this Connector.
  3. Click Save and Continue.
  4. Once the Test Connection succeeds, click Finish. New Relic is listed under the list of Connectors.
Usage scope is inherited from the secrets used in the settings. Pro or higher subscription level is needed. For more information, see Introduction to New Relic's REST API Explorer from New Relic.

Step: Add Splunk

  1. Open a Harness Project.
  2. In Project Setup, click Connectors.
  3. Click + Connector, and click Splunk in Monitoring and Logging Systems. The Splunk Connector Details settings appear.
  1. In Name, enter a name for this connector. If you are going to use multiple providers of the same type, ensure you give each provider a different name.
  2. Click Continue.
  3. In the URL field, enter the URL for accessing the REST API on the Splunk server. Include the port number in the format https://<deployment-name>.cloud.splunk.com:8089. The default port number is 8089, which is required for hosted Splunk, also. For example: https://mycompany.splunkcloud.com:8089.

Splunk APIs require that you 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 Support Portal. For managed deployments, Splunk Support opens port 8089 for REST access. You can specify a range of IP addresses to control who can access the REST API. For self-service deployments, Splunk Support defines a dedicated user and sends you credentials that enable that user to access the REST API. For information see Using the REST API with Splunk Cloud.

Ensure that the Splunk user account used to authenticate Harness with Splunk is assigned to a role that contains the following REST-related capabilities:

  • Search.
  • Access to the indexes you want to search.

In the following example we've created a new Splunk role named Harness User, and assigned it search capability:

We've given this role access to All non-internal indexes. However, we could restrict the access to only the few relevant indexes:

  1. In the Username field, enter the username of your Splunk account.
  2. In Password field, you can choose Create or Select a secret.
For secrets and other sensitive settings, select or create a new Text Secret.
  1. Click Connect and Save. The Setup Delegates settings appear.
  2. You can choose Connect via any available delegate or Connect only via delegates which has all of the following tags. If you select a Delegate, Harness will always use that Delegate for this Connector.
  3. Click Save and Continue.
  4. Once the Test Connection succeeds, click Finish. Splunk is listed under the list of Connectors.

Step: Add Google Cloud Operations (formerly Stackdriver)

For details on settings and permissions, see Google Cloud Platform (GCP) Connector Settings Reference.

Google Cloud Metrics and Google Cloud Logs are supported with GCP connector. See Add a GCP Connector.

The following roles must be attached to the account used to connect Harness and Google Cloud Operations as a Google Cloud Provider:

  • Stackdriver Logs - The minimum role requirement is logging.viewer
  • Stackdriver Metrics - The minimum role requirements are compute.networkViewer and monitoring.viewer.

See Access control from Google.


Please Provide Feedback