For the complete documentation index, see llms.txt. This page is also available as Markdown.

Prometheus and Amazon Managed Prometheus

Akamas Vivo supports multiple Prometheus-compatible data sources, including standard Prometheus, Thanos, and Amazon Managed Prometheus (AMP). This page covers configuration for self-hosted Prometheus and AWS-managed deployments. For Grafana Cloud's Prometheus implementation, see the Grafana Cloud configuration page.

Metric Sources & Prerequisites

Akamas Vivo collects Kubernetes and application runtime metrics from your Prometheus-compatible endpoint. Before connecting your data source, ensure the following components are deployed and configured in your cluster. Two setup configurations are supported: the Kubernetes Monitoring Stack and OpenTelemetry Kubernetes Metrics.

Kubernetes Monitoring Stack

The simplest way to ensure all required metrics are available is to deploy the kube-prometheus-stack Helm chart. It bundles all the necessary components:

  • kube-state-metrics: Kubernetes object state metrics.

  • Kubernetes recording rules from the kubernetes-mixin project.

  • The kubelet and cAdvisor endpoints (/metrics and /metrics/cadvisor), scraped by default. cAdvisor provides the container_* series (CPU and memory usage, throttling, OOM events) and is required in every setup. With a standalone Prometheus, add scrape jobs for both kubelet endpoints.

The chart also installs the Prometheus node exporter, which Akamas Vivo does not use. It can stay in place.

Node Labels for Cluster Autoscaler Recommendations

To provide optimization recommendations for Cluster Autoscaler node groups, Akamas Vivo needs access to Kubernetes node labels. It reads the instance type (node.kubernetes.io/instance-type), the region (topology.kubernetes.io/region, or the OpenTelemetry cloud_region on nodes without it), the node pool (for example agentpool, the EKS node group, the GKE node pool or the Karpenter node pool) and the node role labels (node-role.kubernetes.io/control-plane, node-role.kubernetes.io/master, node-role.kubernetes.io/infra, node-role.kubernetes.io/etcd).

By default, kube-state-metrics does not expose all labels on the kube_node_labels metric. You must explicitly allow them using the metricLabelsAllowlist setting:

Helm values (values.yaml):

kube-state-metrics:
  metricLabelsAllowlist:
    - nodes=[*]

Or, if deploying kube-state-metrics standalone:

Without this configuration, Akamas Vivo will still collect and optimize workload metrics, but Cluster Autoscaler node group recommendations will not be available.

OpenTelemetry Kubernetes Metrics

If your environment uses the OpenTelemetry (OTel) Collector for Kubernetes metrics, Akamas Vivo can read the OTel k8s_* metrics in place of the kube-state-metrics ones.

The following OpenTelemetry Collector components are required:

Component
Purpose

Node, pod, container, and workload metrics (k8s_node_info, k8s_pod_info, k8s_pod_phase, k8s_container_cpu_request, k8s_deployment_desired, k8s_hpa_*, etc.)

Node usage metrics (k8s_node_cpu_usage), which carry the node labels used for node groups

Enriches metrics with workload labels (deployment, statefulset, daemonset, job_name)

The k8s Cluster Receiver emits k8s_node_allocatable_cpu and k8s_node_allocatable_memory_bytes only when allocatable_types_to_report: [cpu, memory] is set, as in the example below.

Example OTel Collector configuration:

Node labels. On Azure AKS clusters, Akamas Vivo reads the instance type from the azure_vm_size label and derives the node pool from azure_vm_name or host_name (aks-<pool>-...). These labels must be present on k8s_node_info or k8s_node_cpu_usage.

Required Kubernetes Metrics

Check the cAdvisor list and the table for your setup. Series carry the namespace, pod and container labels that apply to their level; cAdvisor series and kube_pod_container_resource_* also need node. When you import clusters by label, every series must also carry that label (cluster by default). Series marked optional are only used for charts.

Both setups: cAdvisor

container_cpu_usage_seconds_total, container_memory_rss, container_memory_working_set_bytes, container_cpu_cfs_throttled_seconds_total, container_cpu_cfs_throttled_periods_total, container_cpu_cfs_periods_total, container_oom_events_total

Kubernetes Monitoring Stack

Layer
kube-state-metrics and kubelet
Recording rules

Cluster

kube_node_status_allocatable (resource = cpu, memory)

namespace_cpu:kube_pod_container_resource_requests:sum, namespace_memory:kube_pod_container_resource_requests:sum; optional: namespace_cpu:kube_pod_container_resource_limits:sum, namespace_memory:kube_pod_container_resource_limits:sum

Node

kube_node_status_allocatable, kubelet_running_pods, kube_node_labels (node group recommendations, with the allowlist above)

cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests, cluster:namespace:pod_memory:active:kube_pod_container_resource_requests

Workload

kube_pod_container_resource_requests, kube_pod_container_resource_limits, kube_pod_status_phase, kube_job_owner

namespace_workload_pod:kube_pod_owner:relabel

HPA

kube_horizontalpodautoscaler_info, kube_horizontalpodautoscaler_spec_min_replicas, kube_horizontalpodautoscaler_spec_max_replicas, kube_horizontalpodautoscaler_status_desired_replicas, kube_horizontalpodautoscaler_status_current_replicas, kube_horizontalpodautoscaler_spec_target_metric

Pod and Container

kube_pod_info, kube_pod_container_resource_requests, kube_pod_container_resource_limits

cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests, cluster:namespace:pod_memory:active:kube_pod_container_resource_requests, cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits, cluster:namespace:pod_memory:active:kube_pod_container_resource_limits

OpenTelemetry Kubernetes Metrics

Layer
Metrics

Cluster

k8s_container_cpu_request, k8s_container_memory_request_bytes, k8s_node_allocatable_cpu, k8s_node_allocatable_memory_bytes, k8s_pod_phase; optional: k8s_container_cpu_limit, k8s_container_memory_limit_bytes

Node

k8s_node_info, k8s_node_cpu_usage, k8s_node_allocatable_cpu, k8s_node_allocatable_memory_bytes, k8s_container_cpu_request, k8s_container_memory_request_bytes, k8s_pod_phase

Workload

k8s_pod_info, k8s_container_cpu_request, k8s_container_cpu_limit, k8s_container_memory_request_bytes, k8s_container_memory_limit_bytes, k8s_deployment_desired, k8s_statefulset_desired_pods, k8s_daemonset_desired_scheduled_nodes, k8s_job_desired_successful_pods, and the recording rule namespace_workload_pod:kube_pod_owner:relabel

HPA

k8s_hpa_min_replicas, k8s_hpa_max_replicas, k8s_hpa_desired_replicas, k8s_hpa_current_replicas

Pod and Container

k8s_pod_info, k8s_pod_phase, k8s_container_cpu_request, k8s_container_cpu_limit, k8s_container_memory_request_bytes, k8s_container_memory_limit_bytes

If any of the cluster or node capacity series is missing, the cluster capacity charts stay empty.

HPA scaling targets. Akamas Vivo reads the CPU or memory target of an HPA from kube_horizontalpodautoscaler_spec_target_metric. Without it, HPA recommendations are best-effort, sized from observed CPU demand, and some workloads may get none. This is the case:

  • in OpenTelemetry setups, which have no equivalent metric;

  • for an HPA that defines no CPU or memory target.

OTel HPA metrics cover Deployments and StatefulSets.

Application Runtime Metrics

Beyond Kubernetes infrastructure metrics, Akamas Vivo can analyze application runtime data to provide full-stack optimization recommendations, including JVM heap sizing and Node.js V8 heap configuration, all coordinated with Kubernetes resource limits. This requires your applications to expose runtime metrics via one of the supported exporters.

Label Requirements

Runtime metrics must include labels that identify the Kubernetes node, namespace, pod, and container where the application runs, plus the cluster label when you import clusters by label. Akamas Vivo uses these labels to correlate runtime metrics with the corresponding Kubernetes resources.

The cluster label is chosen in the data import setup (the Use cluster labels option for Prometheus, the Cluster Label Configuration section for Amazon Managed Prometheus). The specific label names used by your exporter are also configured during the data import setup (e.g., node vs k8s_node_name, pod vs k8s_pod_name).

Java

Akamas Vivo supports three Java instrumentation methods. Only one is required per application.

Generation-level heap sizing relies on naming. Old generation pools must contain Old or Tenured and young generation pools Eden or Survivor. Young collections are recognized by collector name (Copy, PS Scavenge, G1 Young Generation, ParNew) with the JMX Exporter, and by the end of minor GC action with Micrometer and the OpenTelemetry agent. Collectors with other names, such as non-generational ZGC, get no generation-level recommendations.

Prometheus JMX Exporter - supported: 1.0.1+

Required metrics:

  • jvm_memory_used_bytes, jvm_memory_committed_bytes, jvm_memory_max_bytes - labels: area

  • jvm_memory_pool_used_bytes, jvm_memory_pool_committed_bytes - labels: pool

  • jvm_gc_collection_seconds_sum - labels: gc

Optional metrics (charts only):

  • jvm_memory_pool_max_bytes - labels: pool

  • jvm_gc_collection_seconds_count - labels: gc

Micrometer / Spring Boot Actuator - supported: Micrometer 1.14+ / Spring Boot 3.4+

Required metrics:

  • jvm_memory_used_bytes, jvm_memory_committed_bytes, jvm_memory_max_bytes - labels: area, id

  • jvm_gc_pause_seconds_sum - labels: action, cause, gc

Optional metrics:

  • jvm_gc_concurrent_phase_time_seconds_sum - labels: cause (added to the GC time when present)

  • jvm_gc_pause_seconds_count, jvm_gc_concurrent_phase_time_seconds_count (charts only)

OpenTelemetry Java Agent - supported: 2.25.0+

Required metrics:

  • jvm_memory_used_bytes, jvm_memory_committed_bytes, jvm_memory_limit_bytes - labels: jvm_memory_type, jvm_memory_pool_name

  • jvm_gc_duration_seconds_sum - labels: jvm_gc_action, jvm_gc_name

Optional metrics (charts only):

  • jvm_gc_duration_seconds_count

Node.js

OpenTelemetry Node.js SDK - supported: @opentelemetry/instrumentation-runtime-node 0.22.0+

Required metrics:

  • v8js_memory_heap_used_bytes, v8js_memory_heap_space_physical_size_bytes, v8js_memory_heap_space_size_bytes - labels: v8js_heap_space_name

Recommended metrics:

  • v8js_memory_heap_limit_bytes

Optional metrics:

  • nodejs_eventloop_utilization_ratio - used for findings

  • v8js_gc_duration_seconds_sum, v8js_gc_duration_seconds_count - labels: v8js_gc_type (charts only)

Default Prometheus

Prometheus is an open-source monitoring and alerting toolkit designed for reliability and scalability in cloud-native environments.

Requirements

Before connecting Prometheus to Akamas Vivo, ensure you have the followings.

Required Information

  • Endpoint URL: The HTTP endpoint of your Prometheus server (e.g., http://prometheus-server:9090).

  • Custom Headers (optional): Additional HTTP headers for authentication or routing.

Authentication Options

Akamas Vivo supports Prometheus instances with and without authentication:

  • No Authentication: Default Prometheus installations without security enabled.

  • Custom Headers: For authenticated Prometheus variants like Thanos, you can configure custom HTTP headers:

    • Bearer Token Authentication: Add Authorization: Bearer <token> header.

    • Basic Authentication: Add Authorization: Basic <base64-credentials> header.

    • API Key Headers: Add custom headers like X-API-Key: <key> if required by your setup.

    • Proxy Headers: Add routing or identification headers required by reverse proxies.

For Grafana Cloud Prometheus, use the dedicated Grafana Cloud configuration which handles authentication automatically.

Network Access

  • Network connectivity from Akamas Vivo to your Prometheus endpoint.

  • Firewall rules allowing HTTP/HTTPS traffic to the Prometheus API.

You can obtain this information from the following references:

Configuration

To connect to a Prometheus instance:

  1. Provide the required credentials (see above).

  2. Save the integration once validated.

  3. Test Connection to verify the configuration.

Amazon Managed Prometheus (AMP)

Amazon Managed Prometheus is a fully managed Prometheus-compatible monitoring service that provides secure, scalable metrics storage and querying for container workloads.

Requirements

Before connecting Amazon Managed Prometheus to Akamas Vivo, ensure you have the followings.

Required Credentials

  • Endpoint URL: Your AMP workspace query endpoint in the format https://aps-workspaces.{region}.amazonaws.com/workspaces/{workspace-id}/ .

  • AWS Access Key: IAM access key ID with AMP read permissions.

  • AWS Secret Key: Corresponding IAM secret access key.

  • AWS Region: The AWS region where your AMP workspace is deployed (e.g., us-east-1).

Required IAM Permissions

Your IAM credentials must have the following permissions:

  • aps:QueryMetrics: Query metrics from the AMP workspace.

  • aps:GetMetricMetadata: Retrieve metadata about available metrics.

You can obtain this information from the following references:

Configuration

To connect to Amazon Managed Prometheus:

  1. Provide the required credentials (see above).

  2. Save the integration once validated.

  3. Test Connection to verify the configuration.

Advanced Options

These advanced settings allow you to tune the data extraction process for Prometheus-compatible data sources to optimize performance and manage query load. In most cases, the default values work well, but you can adjust them based on your environment size and query performance.

When your imports run through the managed extraction pipeline, a single tuning option is available:

  • Concurrency: Maximum number of concurrent queries the import sends to your Prometheus endpoint (default: 20; selectable values: 5, 10, then 20 to 100 in steps of 10). Raise it for a faster import if your endpoint can absorb the extra query load; values above 20 show a warning because they may trigger rate limiting or degrade the monitoring backend while the import runs.

Legacy Advanced Options

Imports running through the legacy pipeline expose the following options instead:

  • Retries: Number of retry attempts for failed Prometheus queries (default: 1). Increase this value if you experience intermittent connectivity issues or timeout errors. Higher values increase resilience but may slow down extraction when encountering persistent failures;

  • Parallelism: Number of concurrent worker threads for parallel query execution (default: 5). Increase for faster extraction if your Prometheus instance can handle higher query rates, or decrease to reduce load on the server;

  • Batch Size: Number of entities to batch in a single Prometheus query (default: 20). Determines how many pods, containers, or other entities are included in a single query. Increase to reduce total number of queries (faster extraction), or decrease to reduce individual query complexity and memory usage.

Last updated

Was this helpful?