#Conditions

Create Conditions

When you are creating conditions, the Policy Editor counts the number of metrics that apply to the conditions you have set. To view those metrics, click on the link. This link opens the list of matching metrics in a new tab. Create a Metric Condition Navigate to Alerts > New Policy > Conditions > Add Condition > Add Metric Condition. To edit an existing policy, Navigate to Alerts > Show All Policies > Click Policy Name > Edit Policy > Conditions > Add Metric Conditions.

Create External Event Conditions

External Event conditions for policies are typically used in conjunction with Webhook integrations. See the Webhook integration setup or Webhook API documentation for more information. Open Policy Editor. Click Conditions. Click Add Condition, then select Add External Event Condition. Type into the fields to create a proper filter: Message Contains: A regex statement that attempts to match a word or phrase in the event message. Title Contains: A regex statement that attempts to match a word or phrase in the event’s title.

Policies

A policy is a set of conditional tests used to set custom rules for when Metricly will generate an event or other notifications. In other words, policies allow you to define various types of abnormal element behavior, then notify you when that abnormal behavior occurs. Use the Policy Editor to add, edit, enable, disable, or delete policies. A policy is made up of a scope, condition(s), duration, and notification(s). The Scope defines the element or elements to which a policy is applied.

Regex Guide

Use Regex to Match Metric Conditions Regex uses all metrics that contain your input value. Typing aws.elb.httpcode.* would match both aws.elb.httpcode_backend_2xx, as well as netuitive.aws.elb.httpcodebackenderrorpercent. Exclude computed metrics using a ^ before the start of a metric name. Use Metric Tags to select a tag to further filter your condition. We recommend testing any regular expressions that you create at https://regexr.com. Match String Match the start and end of the string contained between ^ and $.