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:
You can simply copy and paste that query into Harness as:
See Expression queries from Prometheus for example of queries, but always use the placeholders demonstrated above.
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. 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.