Monitoring & Optimization
Cloud Native Monitoring
Metrics
7min
kubernetes 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 custom aws service metrics 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 prerequisites basic understanding of aws cloudformation syntax and operations familiarity with the aws service metrics you wish to monitor custom metric format to create a custom metric, you need to output parameters from your cloudformation template in the following format name \<metric display name>|namespace \<aws metric namespace>|metricname \<aws metric name>|statistics \<aws metric statistics>|unit \<aws metric unit>|dimensions \<key>=\<value>,\<key>=\<value> 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 example monitoring cpu utilization in amazon ecs to monitor the average cpu utilization of an ecs service, you would define the following in your cloudformation template's outputs section { "outputs" { "metriccpuusage" { "value" { "fn sub" "name\ cpu|namespace\ aws/ecs|metricname\ cpuutilization|statistics\ average|unit\ percent|dimensions\ clustername=${ecscluster},servicename=${fargateservice name}" }, "description" "custom metric for monitoring cpu utilization " } } } deployment 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