Health Monitoring Quickstart

Updated 1 month ago by Renu Bhaskaran

Currently, this feature is in Beta.

A Harness Monitored Service is a Service and Environment combination that Harness monitors for:

  • Any changes, such as deployments, infrastructure changes (Kubernetes events, auditing, etc), and alerts (PagerDuty, etc)
  • Any health trend deviations using logs and metrics

This quickstart walks you through the steps to create a Monitored Service and add a Health Source to monitor the health of your service in its associated environment using logs and metrics collected from an APM or logging tool.

Objectives

You'll learn how to:

  • Add a Monitored Service to track your service in its environment
  • Add a Health Source to monitor the health of your service using logs and metrics

Before You Begin

Harness Monitored Services and Change Sources can be set up without any Harness deployments having been performed, but there won't be much data for Harness to display.

If you already have Harness deployments in this Project, then you can use the Services and Environments from any of those deployments. 

If there are no deployments in your Harness account, we recommend that you first follow the steps in a CD Quickstart to perform a deployment: Kubernetes CD Quickstart, Helm CD Quickstart, or Kustomize Quickstart.

Step 1: Add a New Monitored Service

In the Harness Project with the Service you want to monitor, navigate to the Change Intelligence module.

Click Monitored Services.

Click New Monitored Service. The Add New Monitored Service settings appear.

This page displays all the settings that you need to enable to add a Harness Service, and to define a Health Source.

You can also set up a Monitored Service in the Verify step in a CD stage.

Step 2: Add a Service

A Service represents your microservices, Serverless functions, and other workloads logically.

When you add a Service as a Monitored Service, it allows you to associate change records, actions, logs, metrics, and, SLO’s to the respective service.

In Overview under the Service tab, Application is selected by default in the Type field.

In Create or select a Service, choose the Harness Service to be monitored from the list.

As mentioned earlier, if there are no Harness deployments in this Project you will not have any Services. We recommend that you first follow the steps in a CD Quickstart to perform a deployment: Kubernetes CD Quickstart, Helm CD Quickstart, Kustomize Quickstart.

In Create or select an Environment, choose Environment where the Harness Service is deployed from the list.

Environments represent your deployment targets logically (QA, Prod, etc). When you add an Environment to a Monitored Service, it allows you to associate change records, actions, logs, metrics, and, SLO’s to the respective service within its associated environment.

The Monitored Service Name field auto-populates the concatenation of the Harness Service and Environment names.

Step 3: Define Your Sources

A Health Source is a combination of a Harness Service and associated Environment that monitors changes in health trends of the service using logs or metrics collected from an APM or logging tool.

To create a new Health Source, click Add New Health Source.

The Add New Health Source settings appear.

In Select health source type, select AppDynamics.

In Health Source Name, enter a name for the AppDynamics Health Source.

Click Select Connector.

Connectors contain the information necessary to integrate and work with 3rd party tools.

Harness uses Connectors to authenticate and perform operations with a 3rd party tool.

In the Connector settings, select an existing Connector or click New Connector to create a new one.

When your Connector is set up, click Apply Selected. The Connector is added to the Health Source.

In Select Feature, select the APM or logging tool component to use. For example, if you select AppDynamics as the Health Source Type, select Application Monitoring.

Click Next.

The settings in Customize Health Source depend on the Health Source Type you selected. For example, the Customize Health Source settings for AppDynamics Health Source appears as shown below:

You can select the AppDynamics application and tier to map the Harness Service to the monitored environment.

In Metric Packs, select the metrics you want Harness to use.

Click Validation Passed or No Data to see the data received from the tool.

Click Submit.

Next click Save on the top-right and the Monitored Service appears in the list.

The list displays details like Service name, change events, health trends, health scores, and whether the service is enabled. To gain more insights about the Service health, click the name of the Monitored Service.

In this tutorial, you learned how to:

  • Add Monitored Services to Harness
  • Add a Health Source which enables health tracking by aggregating metric and log data


Please Provide Feedback