2 - 24/7 Service Guard for Prometheus

Updated 1 month ago by Michael Cretzman

Harness 24/7 Service Guard monitors your live applications, catching problems that surface minutes or hours following deployment. For more information, see 24/7 Service Guard Overview.

Harness 24/7 Service Guard differs from Deployment Verification in that it monitors the live microservice whereas Deployment Verification monitors the hosts and nodes for the first 15 minutes following steady state.

You can add your Prometheus monitoring to Harness 24/7 Service Guard in your Harness Application Environment. See 1 - Prometheus Connection Setup.

This section assumes you have a Harness Application set up and containing a Service and Environment. For steps on setting up a Harness Application, see Application Checklist.

24/7 Service Guard Setup

To set up 24/7 Service Guard for Prometheus, do the following:

  1. Ensure that you have added Prometheus as a Harness Verification Provider, as described in Verification Provider Setup.
  2. In your Harness Application, ensure that you have added a Service, as described in Services. For 24/7 Service Guard, you do not need to add an Artifact Source to the Service, or configure its settings. You simply need to create a Service and name it. It will represent your application for 24/7 Service Guard.
  3. In your Harness Application, click Environments.
  4. In Environments, ensure that you have added an Environment for the Service you added. For steps on adding an Environment, see Environments.
  5. Click the Environment for your Service. Typically, the Environment Type is Production.
  6. In the Environment page, locate 24/7 Service Guard.
  7. In 24/7 Service Guard, click Add Service Verification, and then click Prometheus. The Prometheus dialog appears.

  1. Fill out the dialog. The Prometheus dialog has the following fields.
For 24/7 Service Guard, the queries you define to collect logs are specific to the application or service you want monitored. Verification is application/service level. This is unlike Workflows, where verification is performed at the host/node/pod level.



Display Name

Enter the name to identify this Service's Prometheus monitoring on the 24/7 Service Guard dashboard.


The Harness Service to monitor with 24/7 Service Guard.

Prometheus Server

Select the server you added when setting up the Prometheus verification provider.

Metric to Monitor

Every time series is uniquely identified by its metric name and a set of key-value pairs, also known as labels. For more information, see Data Model from Prometheus.A metric requires the following parameters:

  • Metric Name: The name of the metric defined in Prometheus.
  • Metric Type: The type of metric (Response Time, Error, Throughput, or Value).
  • Group Name: The service or request context which the metric relates to. For example, Login.
  • Query: The API query required to retrieve the metric value. You can simply obtain your query from Prometheus and paste it into Harness, including a container name in the query. For example, here is a query in Prometheus:

You can simply copy and paste that query into Harness and replace the container name with $hostName:


See Expression queries from Prometheus for example of queries, but always use the placeholders demonstrated above.

Algorithm Sensitivity

See CV Strategies, Tuning, and Best Practices.

Enable 24/7 Service Guard

Click the checkbox to enable 24/7 Service Guard.

When you are finished, the dialog will look something like this:

  1. Click TEST. Harness verifies the settings you entered.
  2. Click SUBMIT. The Prometheus 24/7 Service Guard is configured.

To see the running 24/7 Service Guard analysis, click Continuous Verification.

The 24/7 Service Guard dashboard displays the production verification results.

For more information, see 24/7 Service Guard Overview.

Next Step

How did we do?