# Metric Template

Metric Template is used to perform the metric analysis. For metric templates, we have provided two categories. They are as follows:

* [**APM** ](#apm-metrics)**&** [**INFRA**](#infra-metrics) - This is the readymade form of the template where based on the industry standards the APM & INFRA of an enterprise application is pre-defined. In this case you do not have to set the APM or INFRA, they are already set.
* [**CUSTOM**](#custom-metric) -  For Custom metric templates you have to define the metrics based on your requirements and specifications.&#x20;

User can create a Metric Template while adding a [**Verification Gate**](https://docs.opsmx.com/user-guide/manage-pipelines/add-intelligent-gates-to-the-pipeline/verification-gate) to the application. To create a metric template follow the steps below:

User can add the Verification Gate after creating a pipeline to the application.&#x20;

To create an application, refer [**here**](https://docs.opsmx.com/release-history/previous-releases/isd-4.0/knowledgebase/manage-application/create-an-application)**.**

To create a pipeline, refer [**here**](https://docs.opsmx.com/release-history/previous-releases/isd-4.0/knowledgebase/manage-pipelines/create-a-pipeline)**.**

1. After creating a pipeline, go to **Pipelines** page, click **Configure** and select the required pipeline. Click **Add Stage**.

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2FK6MYeXoqPnBt4Kc7iamr%2Fimage.png?alt=media\&token=55038642-09d5-4664-b842-5c88c649aebd)

2\.  To select the stages type, click **Type** dropdown and select [**Verification Gate**](https://docs.opsmx.com/user-guide/manage-pipelines/add-intelligent-gates-to-the-pipeline/verification-gate)**.**&#x20;

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2Fv3OyjNfujRda67DhjW9J%2Fimage.png?alt=media\&token=8516748e-5807-4fd2-9e74-af35bf85562e)

3\. The following options appear. In the Template Configuration section, click **Create** next to **Metric Template** field.&#x20;

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2FGQNDLHRe0WZjJ3XHJSJ0%2Fimage.png?alt=media\&token=e89ac44b-6f62-40c8-af94-f071ad24481c)

4\. The **Metric Template** page appears as shown below:

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2FRJIt8qVaXkDBkqWfDena%2Fimage.png?alt=media\&token=77325b44-7226-4879-b2cd-15eed91b8d59)

### **APM Metrics**

In the Metric Template screen, enter the APM metrics details.&#x20;

1\. Enter the **Metric Template Name** in the text box.

2\. Select the APM monitoring provider from the **APM Metrics Provider** drop-down. &#x20;

3\. Select the account for the given monitoring provider from the **Select Account** drop-down. The list appears based on the APM monitoring provider selected.

4\. Select the **Application** for the given account from the **Select Application** drop-down. This list appears based on the selected APM monitoring provider and the account selected.

6\. Click **Next**. Refer to the image below:

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2Fpk8z1tnqvYA3HGVW4GLb%2Fimage.png?alt=media\&token=d13e635b-1b48-438e-992e-bc8c9d8f2bb6)

### **INFRA Metrics**

The INFRA Metrics screen appears as shown below:

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2Fdl0YzcRe0WBygDrVP2LU%2Fimage.png?alt=media\&token=c15665bc-d07b-4dd2-b06b-4025c41796ea)

1. Select the **Monitoring Provider** from the drop-down.
2. Select the **Infrastructure Account** from the drop-down. This list appears based on the selected monitoring provider.&#x20;
3. Click **Next**.

**Metric Config**

The **Metric Config** screen appears as shown below:

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2FB68AKkC5zL6KM94qDF0l%2Fimage.png?alt=media\&token=5f769da5-3b2a-40fe-b606-bf84924a2ea1)

1. Select the **Metric Scope Placeholder** from the drop-down.
2. Enter the **Baseline** in the text box.
3. Enter the **New Release** in the text box.
4. Click the radio button if you want to apply load-based information.
5. Click the radio button to set the Threshold for Metric Failure.
6. Click **Save**.

Once the Metric Template is created it will appear in the list while configuring verification gate for an application as shown below:

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2F1JBCmYlj3yqFcGs96bwG%2Fimage.png?alt=media\&token=316e7129-e3f9-4d99-9e44-150beaaae0f2)

### Custom Metric&#x20;

To create a custom metric template, follow the steps below:

1. On the new metric template screen select the **CUSTOM** tab as shown below:

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2F7BfEwwMDzl6tymCPu6zi%2Fimage.png?alt=media\&token=5f28f5e7-ada1-47b7-8efb-572278783e9a)

2\. Enter the **Metric Template Name** in the text box.

3\. Select the **Datasource** from the drop-down.&#x20;

4\. Select the **Accounts** from the drop-down. This list will appear based on the selected datasource selected.

5\. Enter the **Filter Key** in the text box.

6\. Enter the **Baseline** in the text box.

7\.  Enter the **New Release** in the text box.&#x20;

8\. Enter the **Query Name**, **Query String**.&#x20;

10\. Select the **Risk Direction** from the drop-down.

11\. Enter the **Threshold** percentage.

12\. Select the **Critical checklist** if required.

13\. Select the **Watchlist check box** if required.

14\. Set the **Weightage** in the Weight text box.

15\. Click **Save**.

Once the Metric Template is created it appears in the list while adding a service for an application as shown below:

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2FTWlnlXQ6m2sf6JEHRbbP%2Fimage.png?alt=media\&token=0eb6b935-fd73-4f75-a128-882fae9e38a4)
