Metrics
Using metrics, you can determine if your application is performing as expected or if there is an issue that needs your attention. In Microtica, you can create an alarm to monitor a specific metric and receive an email notification if the metric goes outside what you consider an acceptable range. When you receive an email notification about a triggered alarm event for your Kubernetes application, it indicates that one or more of the specified metrics have exceeded their defined thresholds. To assist your troubleshooting, this document explains how each metric is calculated.
Metric | Description |
---|---|
CPUUtilization | The percentage of CPU time, which is sum of the time spent on user space by the K8s process and the time spent on kernel by the K8s process over the last 5 minutes. |
MemoryUtilization | The resident memory size in bytes of the K8s process over the last 5 minutes. |
HTTPResponseP50Latency | 50th percentile request-response latency: the median value of the request-response latencies over the last 5 minutes. |
HTTPResponseP90Latency | 90th percentile request-response latency: 90% of the request-response latencies were below this value over the last 5 minutes. |
HTTPResponseP99Latency | 99th percentile request-response latency: 99% of the request-response latencies were below this value over the last 5 minutes. |
HTTPRequests | Total number of HTTP requests over the last 5 minutes. |
HTTPClientErrors | Total number of 4xx HTTP response status codes over the last 5 minutes. |
HTTPServerErrors | Total number of 5xx HTTP response status codes over the last 5 minutes. |
CrashesCount | Total number of process exists over the last 5 minutes. |
Microtica allows users to extend the default metrics for various AWS services by creating custom metrics. This enables detailed monitoring and alerting based on specific needs. Custom metrics are defined through AWS CloudFormation templates by outputting parameters in a specific format. This document outlines the process to create and deploy custom metrics.
- Basic understanding of AWS CloudFormation syntax and operations.
- Familiarity with the AWS service metrics you wish to monitor.
To create a custom metric, you need to output parameters from your CloudFormation template in the following format:
- Name - The display name for the metric in the Microtica console.
- Namespace - The namespace of the AWS service (e.g., AWS/ECS, AWS/EC2).
- MetricName - The name of the metric within the AWS service.
- Statistics - The statistic type (e.g., Average, Maximum).
- Unit - The unit for the metric value (e.g., Percent, Seconds).
- Dimensions - Key-value pairs that uniquely identify the metric.
To monitor the average CPU utilization of an ECS service, you would define the following in your CloudFormation template's Outputs section:
To deploy your custom metric, simply include it in your CloudFormation stack and push the changes in Git. Once deployed, go to component Monitoring settings section and click on Sync Metrics button and the custom metric will be available in Microtica console, ready for monitoring and alerting based on your configurations.