Azure Monitoring - Enabling AppInsights and Container Insights

Sharing

Click to Home

Log Issues

Click to Log Issue

Description:

Azure Container Insights is a monitoring service that provides deep visibility and insights into the performance and health of containerized applications running in Azure Kubernetes Service (AKS) and Azure Container Instances (ACI). It helps with monitoring by providing the following capabilities:

  1. Metrics: Container Insights collects and aggregates metrics from the Kubernetes control plane, nodes, and pods. This includes metrics such as CPU and memory usage, network traffic, and pod status. These metrics can be used to monitor the performance and resource usage of your containerized applications.

  2. Logs: Container Insights collects and aggregates logs from the Kubernetes control plane, nodes, and pods. This includes logs from the Kubernetes system, the container runtime, and the applications running in the containers. These logs can be used to troubleshoot issues and monitor the health of your containerized applications.

  3. Alerts: Container Insights provides built-in alerts that can be configured to notify you when specific conditions are met, such as a pod or container becoming unresponsive or a high rate of failed requests.

  4. Dashboards: Container Insights provides pre-built dashboards that display metrics and logs in a visual format, making it easy to identify trends and patterns in the performance and health of your containerized applications.

  5. Anomaly detection: Container Insights is able to detect anomalies in metrics and logs and notify you if something unexpected happens.

  6. Root cause analysis: Container Insights allows you to perform root cause analysis on issues that arise, for example by showing you which pod or container is causing the issue, and by providing the context necessary to understand the problem.

  7. Integration with Azure Monitor: Container Insights is integrated with Azure Monitor, which allows you to collect, analyze, and visualize data from different sources to identify patterns, trends, and insights for better decision making.

    Step by step Deployment of Container Insights.

    1. First, create a new resource group for your AKS cluster and Application Insight
        az group create --name myResourceGroup --location southcentralus 

    2. Create an AKS cluster with the following command. This will create a 3-node AKS cluster: 
       az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 3 --generate-ssh-keys
    3. Connect to the AKS cluster using the following command: 
      az aks get-credentials --resource-group myResourceGroup --name myAKSCluster
    4.  ​​​​​​Create App insights
      az aks enable-addons -a monitoring -n myAKSCluster  -g myResourceGroup 
    5. Deploying Sample Java application

       #Step 1 -
      git clone https://github.com/GoogleCloudPlatform/microservices-demo.git

      #Step 2 -
      cd microservices-demo

      #Step 3- Deploy sample K8 application from google (https://github.com/GoogleCloudPlatform/microservices-demo) on to AKS.
      kubectl apply -f ./release/kubernetes-manifests.yaml

      #Step 4 -  get the EXTERNAL-IP <your-ip> and type [http://%3cExternal-ip]http://<External-ip>
      kubectl get service frontend-external

       

       Once you deploy the above app- you will look into the application monitoring data.adservice is the java application


      For more additional details navigate to Overview of Container insights in Azure Monitor - Azure Monitor | Microsoft Learn

Click to Home