Setting Up KloudMate Alarms
KloudMate lets users create and configure alarms for events that are critical to their application. By setting up alarms on KloudMate, users can keep abreast of times when certain metrics are above or below a set of pre-defined thresholds and take necessary actions as soon as possible. These alarms are entirely customizable and can be configured for any AWS service available in KloudMate Inventory, using metrics associated with them. For example, the following are some of the Lambda Function metrics for which users can set up alarms:
- Memory Used
- Coldstart Count
- Coldstart Duration
Users can create, delete, and edit their alarms in the Alarms section.
- Click on the bell icon and navigate to the Alarms section from the main dashboard
- Alarms section will display a list of existing alarms (if any)
- You can view, pause, delete or edit any of these alarms using their corresponding more-options icon
To learn about the key concepts of KloudMate Alarms, see Understanding Kloudmate Alarms
To create a new alarm, click on the Create Alarm button located at the top right corner of the alarms screen. It will open the Create Alarm page.
Step 1: Setup query conditions and evaluation expressions
- You can create and setup multiple queries and expressions using the Add Query and Add Expression buttons
- You can also replicate a query or expression by clicking on the copy icon available at the top right corner of each query or expression
- For each query and expression, there will be a unique alphabetical notation associated with it, such as A, B, C, and so on.
- For query conditions:
- Choose CloudWatch or KloudMate as the data source in the first dropdown menu
- Set a time duration for which you want the data to be fetched, either use the dropdown menu or use the custom field (in case of custom time, enter the time duration in seconds).
- Select the Region from its corresponding dropdown menu. It specifies the AWS region of the service you want to create an alarm for
- Select the Namespace from its corresponding dropdown menu. The namespace is the service you want to create an alarm for
- Select the Metric from its corresponding dropdown menu. It specifies the metric associated with the selected namespace that you want to monitor
- Select the Statistic from its corresponding dropdown menu. It is the statistical function you want to use to calculate data points
- You can use Dimensions to configure the alarm for a group resources of the selected namespace.
- For example, for EC2, you can choose an autoscaling group name, image id, instance type, and more in the Dimensions dropdown menu to configure the alarm for all the instances in the same dimension
- Click on the Run Query button
- For evaluation expressions:
- In evaluating expressions, the value of a query condition or an expression that has already been configured can be passed as parameters using their alphabetical notation such as A, B, C, and so on. Note that an expression can be passed as an parameter only in case of multiple expressions
- For expression, choose from Math expression, Reduce, or Condition expression options
- In the case of Math expression, enter the expression that you want to apply to the value of a query/expression in the given text field. For example $A+1, $A<$B, $A && $C
- In the case of Reduce expression, use the first dropdown menu to choose the function you want to use to aggregate the values of a query/expression into a single value, and select the desired query/expression from the Input dropdown menu
Note: Following are some of the available functions to choose from:
- mean() : Get average value
- max() : Get maximum value
- min() : Get minimum value
- sum() : Get sum of all value
- last() : Get the last Value
- count() : Get the total number of Value
In the case of Condition expression, select the function and a query/expression from their respective dropdown menus. Select the desired condition from its corresponding dropdown menu and provide a value against which the condition will be evaluated
You can add multiple conditions in a condition expression and choose how they work together using logical operators such as OR & AND
- Click on the Run Queries button
For more information, see Writing Expressions for KloudMate Alarms.
Step 2: Configure the alarm evaluation settings
- For alarm condition, select the query or the expression to trigger the alarm
- In the Evaluate every (seconds) field, define how frequently the alarm condition should be evaluated
- In the Evaluate for (seconds) field, define how long the alarm condition should be evaluated and found to be true before the alarm gets triggered
- In the Alert state dropdown menus, select the alarm behavior if the query results in no data or in an error
- Click on the Preview alarms button to run the query instantaneously and check the result
Step 3: Add alarm details
- Enter Alarm name and a description of the alarm.
- You can use the Projects dropdown menu to assign the alarm to a specific project
Step 4: Add notification tags
- Add tags to the alarm.
- You can configure a notification policy to send notifications to particular channel when the alarm is triggered with matching tags.
Step 5: Save the alarm
- Click on the Save button to save the alarm, or click on the Save & Close button to save the alarm and go back to the alarms section