2 - 24/7 Service Guard for Prometheus
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.
24/7 Service Guard Setup
To set up 24/7 Service Guard for Prometheus, do the following:
- Ensure that you have added Prometheus as a Harness Verification Provider, as described in Verification Provider Setup.
- 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.
- In your Harness Application, click Environments.
- In Environments, ensure that you have added an Environment for the Service you added. For steps on adding an Environment, see Environments.
- Click the Environment for your Service. Typically, the Environment Type is Production.
- In the Environment page, locate 24/7 Service Guard.
- In 24/7 Service Guard, click Add Service Verification, and then click Prometheus. The Prometheus dialog appears.
- Fill out the dialog. The Prometheus dialog has the following fields.
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.
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:
When you add your query in Query, you want the query to return a single time series result for the metric and transaction you identify. If it returns multiple results, Harness will not process your verification step.
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
See Expression queries from Prometheus for example of queries, but always use the placeholders demonstrated above.
In the Custom Thresholds section, you can define Ignore Hints. These are rules that instruct Harness to skip certain metrics/value combinations from verification analysis.
To configure these rules, see Apply Custom Thresholds to 24/7 Service Guard.
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:
- Click Test. Harness verifies the settings you entered.
- Click Submit. Prometheus 24/7 Service Guard is now 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.