Sumologic
If you are using an aggregation operator in your Sumo Logic metrics query, then you must include the service instance identifier dimension.
Before you begin
This page assumes you have followed the rest of the steps to set up CV. To learn more, go to Configure CV
Add Sumologic as a health source
To add a health source:
- In the Health Sources section, select + Add. The Add New Health Source dialog appears.
- On the Define Health Source tab, do the following:
- In the Define Health Source section, select SumoLogic as health source type.
- In the Health Source Name field, enter a name for the health source.
- In the Connect Health Source section, select the Select Connector.
The Create or Select an Existing Connector dialog appears. - Select a connector for the Sumo Logic health source and then select Apply Selected.
The selected connector appears in the Select Connector dropdown field. - In the Select Feature, you can either select SumoLogic Cloud Metrics or SumoLogic Cloud Logs.
- Select Next.
The Configuration tab appears.
Define metric and log configuration settings
Perform the following steps based on the feature you have selected in the Select Feature field.
- Steps to configure SumoLogic Cloud Metrics
- Steps to configure SumoLogic Cloud Logs
- On the Configuration tab, select + Add Metric.
The Add Metric dialog appears. - Enter the following information and then select Submit:
- Metric name: Enter a name for the metric. For example, Memory Metric.
- Group name: If the group to which you want to add the metric already exists, select it.
If you want to create a new group, select + Add New. In the Add Group Name dialog enter a group name, and then select Submit.
- In the Add Metric dialog, select Submit.
New group and metric are created. The query specifications and mapping settings are displayed. These settings help you get the desired metric data from the Sumo Logic platform and map it to Harness service. To learn about Sumo Logic metrics and queries, go to https://help.sumologic.com/docs/metrics/.
Define a query
In the Query box, enter your metric query and then select Run Query. Query: Disk usage records and chart being displayed for the query
Sample data is displayed in the Records box. The Chart box displays the graph corresponding to the sample data. This helps you verify if the query that you have built is correct.Sample query for memory usage
metric=memory
Assign services
In the Assign section, select the services to which you want to apply the Sumo Logic metric. Following options are available:
- Continuous Verification (Applied to the pipelines in the Continuous Deployment): Select this option to use the metric data in the Continuous Deployment pipeline to ensure that the deployed service is running safely and to perform automatic rollbacks. In addition, the metric will be used to apply machine learning in detecting and highlighting future deployment issues.
- Service Health: Select this option to use the metric data to track the changes in the health trend of your monitored service.
- Service Level Indicator (SLI): Select this option to use the metric data to measure the SLI and obtain the performance of the service.
Configure risk profile
If you select Continuous Verification (Applied to the pipelines in the Continuous Deployment) or Service Health, expand the section below and follow the instructions for configuring the risk profile. The Risk Profile section is only visible if you have selected Continuous Verification (Applied to the pipelines in the Continuous Deployment) or Service Health in the Assign section. Higher counts = higher risk Lower counts = higher risk Note that you can select multiple options. The Map service instance identifier section is only visible if you have selected Continuous Verification (Applied to the pipelines in the Continuous Deployment) in the Assign section. In Service Instance Identifier (only needed for CV), specify the service instance identifier, which represents a dynamically created service that you deploy using Harness. The default value is The Advanced (Optional) section is only visible if you have selected Continuous Verification (Applied to the pipelines in the Continuous Deployment) in the Assign section. You can select the types of events for which you want to set thresholds in CV. Metrics that match the selected rules will not be flagged as anomalous, regardless of the analysis. To set the Ignore Thresholds for CV: You can select the type of events for which you want to set thresholds in CV. Any metric that matches the selected rules will be marked as anomalous and cause the Workflow state to fail. To set fail-fast thresholds for CV, follow these steps:Risk Profile settings
Risk Profile
Map service instance identifier
_sourceHost
.Advanced (Optional)
Ignore Thresholds
Fail-Fast Thresholds
- On the Configuration tab, select + Add Query.
The Add Query dialog appears. - Enter a name for the query and then select Submit.
The Custom Queries settings are displayed. These settings assist in retrieving the desired logs from the Sumo Logic platform and mapping them to the Harness service. To learn about Sumo Logic logs, go to https://help.sumologic.com/docs/search/.
Define a query
- In the Query field, enter the log query and select Run Query to execute it. This displays a sample record in the Records field, allowing you to confirm the accuracy of the query you've constructed. For the verification process to be effective, the query should be designed to accurately extract error logs specific to the service.```
- In the Field Mapping section, select the Service Instance Identifier to display the logs, and then select Get sample log messages. Sample logs are displayed which include a timestamp, the host where the log was recorded, and the log message itself. These three properties are critical for accurate verification, so it's important to check their accuracy. If the host information doesn't match the actual instance of your service, you should review the mapping provided for the Service Instance Identifier.
Sample log query
Query: _sourcename = "Http Input"