Setting Up KloudMate Alarms
10 min
kloudmate lets users create and configure alarms for events that are critical to their application by setting up alarms, users can monitor when certain metrics cross pre defined thresholds and take necessary actions promptly getting started navigate to the alarms section from the left navigation menu the alarms screen displays a list of all existing alarms along with their current state, name, and description the summary at the top shows the total number of alarm rules with a count of how many are currently firing or pending from the more options (⋯) icon on any alarm, you can 	• view the alarm details 	• view state history of the alarm 	• edit the alarm configuration 	• duplicate the alarm 	• pause evaluation or pause notifications 	• delete the alarm to learn about the key concepts of kloudmate alarms, see understanding kloudmate alarms docid\ eow21a6wdksrul8gh6w4l creating a new alarm click the create alarm button at the top right corner of the alarms screen this opens the create alarm page, which is divided into four sections you can create multiple queries and expressions using the add query and add expression buttons each query or expression is assigned a unique alphabetical notation (a, b, c, and so on) you can duplicate any query or expression using the copy icon at the top right corner of each block step 1 setup query conditions and expressions select opentelemetry or kloudmate as the data source from the first dropdown 1 1 setting up query conditions for opentelemetry / kloudmate data set select the dataset you want to retrieve from your data source metric to aggregate select the metric associated with the selected dataset that you want to monitor group by enter the attributes to group the data points filters add filters to narrow down the retrieved data points opentelemetry users can also use prometheus query language to retrieve data and set alarms 1 2 setting up query conditions for aws (cloudwatch) time range set the duration for which data should be fetched using the dropdown or enter a custom value in seconds region select the aws region of the service you want to monitor namespace select the aws service namespace you want to create an alarm for metric select the metric associated with the selected namespace statistic select the statistical function to use when calculating data points dimensions optionally configure the alarm for grouped resources within the selected namespace for example, for ec2, you can filter by autoscaling group name, image id, instance type, and more click run query to fetch data 1 3 time range expressions for custom time alarm query time ranges support the following operators (subtract time) same units and keywords as dashboards — refer to time range expressions and settings examples now , now 5m 1 4 setting up evaluation expressions expressions let you apply logic to query results reference any configured query or expression using its alphabetical notation (a, b, c, and so on) note that an expression can be passed as a parameter only when multiple expressions are configured choose from the following expression types math expression enter a mathematical expression to apply to the value of a query or expression examples $a+1 , $a<$b , $a && $c for more information, see writing expressions for kloudmate alarms docid 6ugpkxobmned8soegnba3 reduce select a function to aggregate the values of a query or expression into a single number, then select the target query or expression from the input dropdown available functions include 	• mean() — average value 	• max() — maximum value 	• min() — minimum value 	• sum() — sum of all values 	• last() — last value 	• count() — total number of values condition expression select a function and a query or expression, then choose a condition and provide a threshold value to evaluate against you can add multiple conditions and combine them using and or or logical operators click run queries to execute all configured queries and expressions to avoid the nodata issue when using multiple queries in a single alarm, use the ifnull operator to assign a default value read more in writing expressions for kloudmate alarms docid 6ugpkxobmned8soegnba3 step 2 configure evaluation settings alarm condition select the query or expression that should trigger the alarm (a, b, or c) evaluate every define how frequently the alarm condition should be evaluated (e g , 1m ) pending duration define how long the alarm condition must remain true before the alarm is triggered (e g , 5m ) alert state if no data select the alarm behavior when the query returns no data alert state if error select the alarm behavior when the query returns an error click preview alarms to run the query immediately and check the result step 3 add alarm details alarm name enter a name for the alarm description add a description to help identify the alarm’s purpose responder context optionally add context to help on call responders understand the alarm and act quickly dashboard link a relevant dashboard for quick reference summary add a summary that will be included in notifications to provide context playbook url add an optional runbook or playbook url with on call instructions custom annotations add any custom key value annotations sla target set an sla target percentage for this alarm step 4 add notification tags add tags to the alarm to route notifications through a matching notification policy when the alarm is triggered, notifications will be sent to the channels configured in the matching notification policy step 5 save the alarm click save to save the alarm, or save & close to save and return to the alarms screen related resources understanding kloudmate alarms https //docs kloudmate com/understanding kloudmate alarms writing expressions for kloudmate alarms https //docs kloudmate com/writing expressions for kloudmate alarms