Azure metrics configuration

Configure Cobrowse on Microsoft Azure using the provided Terraform configurations, and seamlessly integrate with Azure Monitor for insightful container metrics.

If you are running the Cobrowse Enterprise Azure Terraform configuration, Azure Monitor provides a Prometheus integration for its container insights offering. To configure the integration you'll be asked to configure scrape settings (we have configured this already) and deploy a ConfigMap resource.

Prometheus scraping settings

In the Prometheus scraping settings section of the Prometheus integration instructions, we will be using the "Cluster-wide" perspective using Pod annotation endpoints. The Cobrowse Enterprise for Azure Terraform configuration already applies all the pod annotations necessary for this integration, so no change to your cluster is required in this section of the instructions.

Configure and deploy ConfigMaps

In the Configure and deploy ConfigMaps section of the Prometheus integration instructions, you will need to create a new ConfigMap resource in your cluster to configure the Prometheus integration exporter to collect the application metrics.

For convenience, we have provided a sample configuration resource that has the key changes made from the Azure template to enable Prometheus metrics scraping. This configuration file is located in your Cobrowse Enterprise for Azure Terraform directory at path container-azm-ms-agentconfig.example.yaml. The key changes made are:

  • [prometheus-data-collection-settings].[prometheus_data_collection_settings.cluster].monitor_kubernetes_pods

    • Value changed to true

This example configuration will cause all pods in your cluster that have Prometheus scraping enabled in their pod annotations to have their Prometheus metrics collected and sent to Azure Monitor container insights.

If this is cost prohibitive, consider using the fieldpass and fielddrop settings to configure which metrics are collected. Furthermore, if you have multiple namespaces that contain other services whose Prometheus metrics you do not wish to scrape, you can use the monitor_kubernetes_pods_namespaces setting to limit the namespaces where pod metrics are scraped.

More information to help control your Azure Monitor spend can be found in the Container Insights pricing documentation.

Once the ConfigMap resource is deployed, custom metrics should start being collected and available within the Azure Monitor Logs section of the Azure Portal within a few minutes.

Last updated