2 - 24/7 Service Guard for Stackdriver
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.
You can add your Stackdriver monitoring to Harness 24/7 Service Guard in your Harness Application Environment. See 1- Stackdriver Connection Setup.
24/7 Service Guard Setup
To set up 24/7 Service Guard for Stackdriver, do the following:
- Ensure that you have added Stackdriver as a Harness Verification Provider, as described in 1- Stackdriver Connection 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 Stackdriver. The Stackdriver dialog appears.
- Fill out the dialog. The dialog has the following fields. For information on the log entries used, see Viewing Logs from GCP.
The name that will identify this service on the Continuous Verification dashboard. Use a name that indicates the environment and monitoring tool, such as Stackdriver.
The Harness Service to monitor with 24/7 Service Guard.
GCP Cloud Provider
Select the GCP Cloud Provider to use, as described in Stackdriver Connection Setup. If you currently connect to GCP via a Kubernetes Cluster Cloud Provider, you must set up a GCP Cloud Provider for access to the Stackdriver data on your cluster.
Enter search keywords for your query. You can use the same filters you have in GCP Logs Viewer.
Simply copy a filer entry into Search Keywords:
To use multiple filter entries, place an AND between them or use multiline entries. For example:
For advanced filter examples, see Advanced filters library from GCP.
Host Name Field
Enter the log field that contains the name of the host/pod/container for which you want logs. You can enter a pod ID or field name for example.
Harness uses this field to group data and perform analysis at the container-level.
For example, the query in Search Keywords looks for pods labelled
In Host Name Field, you would enter pod_id because it is the log field containing the pod name. In a log, this field will be in the resource section:
Enable 24/7 Service Guard
Click the checkbox to enable 24/7 Service Guard.
Select the baseline time unit for monitoring. For example, if you select For 4 hours, Harness will collect the logs for the last 4 hours as the baseline for comparisons with future logs. If you select Custom Range you can enter a Start Time and End Time.
When you are finished, the dialog will look something like this:
- Click TEST. Harness verifies the settings you entered.
- Click SUBMIT. The Stackdriver 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.