Skip to content

This is the Experimental version (Latest). It is under active development and may change. For the most reliable documentation, use the version selector in the top-right to switch to Stable, or click here to go to the Stable version's homepage.

Grafana Alloy (Platform) Installation

Last updated:

Grafana Alloy (Platform) is a Metrics/Logs Gathering from Kubernetes Cluster and its Workloads


Grafana Alloy (Platform) will be installed on 🟢 Management 🟦 Non-Production Workload 🟥 Production Workload

  1. Set Common Configuration across Kubernetes Clusters

    Set Feeding Endpoints for Metrics/Logs

    Ensure GRAFANA_MIMIR_DOMAIN, GRAFANA_LOKI_DOMAIN, and ALLOY_COLLECT_TENANT_ID are defined as per your tool variables.

  2. Create Helm Values Configuration, create for 🟢 Management Kubernetes Cluster

    (Ensure cluster name variables are loaded for Management Cluster)

    Terminal window
    cat <<EOF > $BASE_WORKING_DIR/helm-values/grafana-alloy-platform-management-full-values.yaml
    cluster:
    # -- The name for this cluster.
    # @section -- Cluster
    name: "${GRAFANA_ALLOY_CLUSTER_NAME}"
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ## - kubernetesAPIService is not used in the new chart.
    ######################################################################################################################
    #
    # Destinations
    #
    # -- The list of destinations where telemetry data will be sent.
    # See the [destinations documentation](https://github.com/grafana/k8s-monitoring-helm/blob/main/charts/k8s-monitoring/docs/destinations/README.md) for more information.
    # @section -- Destinations
    destinations:
    ## OPSTELLA_CUSTOMIZE: Destination to Mimir and Loki
    - name: metricsService
    type: prometheus
    url: https://${GRAFANA_MIMIR_DOMAIN}/api/v1/push
    tenantId: "${ALLOY_COLLECT_TENANT_ID}"
    - name: logsService
    type: loki
    url: https://${GRAFANA_LOKI_DOMAIN}/loki/api/v1/push
    tenantId: "${ALLOY_COLLECT_TENANT_ID}"
    ######################################################################################################################
    #
    # Features
    #
    #########------------------------------------------------------------------------------------------###################
    ## Metrics
    # -- Cluster Monitoring enables observability and monitoring for your Kubernetes Cluster itself.
    # Requires a destination that supports metrics.
    # To see the valid options, please see the [Cluster Monitoring feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-cluster-metrics).
    # @default -- Disabled
    # @section -- Features - Cluster Metrics
    clusterMetrics:
    ## OPSTELLA_CUSTOMIZE: Enable Kubernetes Cluster Metrics
    enabled: true
    ### Scraping Metrics Series ###
    kubelet:
    metricsTuning:
    useDefaultAllowList: true
    includeMetrics:
    - kubelet_volume_stats_available_bytes
    - kubelet_volume_stats_capacity_bytes
    cadvisor:
    metricsTuning:
    useDefaultAllowList: true
    includeMetrics:
    - container_spec_memory_reservation_limit_bytes
    - container_cpu_usage_seconds_total
    - container_cpu_cfs_throttled_periods_total
    - container_cpu_cfs_periods_total
    - container_memory_usage_bytes
    apiServer:
    metricsTuning:
    useDefaultAllowList: true
    kube-state-metrics:
    deploy: false ## HELM: Sub-Chart Condition // Prometheus Kube-State-Metrics // Explicitly Deploy
    enabled: false
    metricsTuning:
    useDefaultAllowList: true
    includeMetrics:
    - kube_deployment_created
    - kube_pod_status_ready
    - kube_pod_container_status_terminated
    - kube_pod_container_status_waiting
    - kube_pod_container_resource_requests_cpu_cores
    - kube_pod_container_resource_requests_memory_bytes
    - kube_persistentvolumeclaim_info
    - kube_persistentvolume_status_phase
    - kube_pod_container_status_restarts_total
    - kube_pod_container_status_ready
    - kube_pod_info
    - kube_persistentvolumeclaim_access_mode
    - kube_persistentvolumeclaim_status_phase
    node-exporter:
    deploy: true ## HELM: Sub-Chart Condition // Prometheus Node-Exporter // Explicitly Deploy
    enabled: true
    ### --- ###
    nameOverride: "prometheus-node-exporter" ## OPSTELLA_CUSTOMIZE: Distinguish that is NOT under Grafana
    fullnameOverride: "prometheus-node-exporter" ## OPSTELLA_CUSTOMIZE: Distinguish that is NOT under Grafana
    metricsTuning:
    useDefaultAllowList: true
    windows-exporter:
    deploy: false ## HELM/OPSTELLA_CUSTOMIZE: Sub-Chart Condition // Prometheus Windows-Exporter // Opstella doesn't (yet) support Windows Containers
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Annotation Autodiscovery enables gathering metrics from Kubernetes Pods and Services discovered by special annotations.
    # Requires a destination that supports metrics.
    # To see the valid options, please see the [Annotation Autodiscovery feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-annotation-autodiscovery).
    # @default -- Disabled
    # @section -- Features - Annotation Autodiscovery
    annotationAutodiscovery:
    enabled: true
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Prometheus Operator Objects enables the gathering of metrics from objects like Probes, PodMonitors, and
    # ServiceMonitors. Requires a destination that supports metrics.
    # To see the valid options, please see the [Prometheus Operator Objects feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-prometheus-operator-objects).
    # @default -- Disabled
    # @section -- Features - Prometheus Operator Objects
    prometheusOperatorObjects:
    enabled: true
    crds:
    deploy: true
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    #
    # Collectors (Alloy instances)
    #
    # An Alloy instance for collecting metrics.
    # To see additional valid options, please see the [Alloy Helm chart documentation](https://github.com/grafana/alloy/tree/main/operations/helm/charts/alloy).
    alloy-metrics:
    enabled: true
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Service Integrations enables gathering telemetry data for common services and applications deployed to Kubernetes.
    # To see the valid options, please see the [Service Integrations documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-integrations).
    # @default -- No integrations enabled
    # @section -- Features - Service Integrations
    integrations:
    alloy:
    instances:
    - name: alloy
    labelSelectors:
    app.kubernetes.io/name:
    - alloy-metrics
    metrics:
    tuning:
    useDefaultAllowList: false
    includeMetrics:
    - alloy_build_info
    #########------------------------------------------------------------------------------------------###################
    ## OPSTELLA_ASSUME Logs (Small Scale) - Kubernetes Cluster Events, etc.
    ## That's why using Alloy as single instance deployment (alloy-singleton)
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Cluster events.
    # Requires a destination that supports logs.
    # To see the valid options, please see the [Cluster Events feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-cluster-events).
    # @default -- Disabled
    # @section -- Features - Cluster Events
    clusterEvents:
    enabled: true
    #
    # Collectors (Alloy instances)
    #
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # An Alloy instance for data sources required to be deployed on a single replica.
    # To see additional valid options, please see the [Alloy Helm chart documentation](https://github.com/grafana/alloy/tree/main/operations/helm/charts/alloy).
    alloy-singleton:
    enabled: true
    #########------------------------------------------------------------------------------------------###################
    ## OPSTELLA_ASSUME Logs (Large Scale) - Pod Logs, etc.
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Pod logs.
    # Requires a destination that supports logs.
    # To see the valid options, please see the [Pod Logs feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-pod-logs).
    # @default -- Disabled
    # @section -- Features - Pod Logs
    podLogs:
    enabled: true
    #
    # Collectors (Alloy instances)
    #
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # An Alloy instance for collecting log data.
    # To see additional valid options, please see the [Alloy Helm chart documentation](https://github.com/grafana/alloy/tree/main/operations/helm/charts/alloy).
    alloy-logs:
    enabled: true
    ######################################################################################################################
    EOF
  3. Create Helm Values Configuration, create for 🟦 Non-Production Workload Kubernetes Cluster

    (Ensure cluster name variables are loaded for Non-Production Cluster)

    Terminal window
    cat <<EOF > $BASE_WORKING_DIR/helm-values/grafana-alloy-platform-nonprod-full-values.yaml
    cluster:
    # -- The name for this cluster.
    # @section -- Cluster
    name: "${GRAFANA_ALLOY_CLUSTER_NAME}"
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ## - kubernetesAPIService is not used in the new chart.
    ######################################################################################################################
    #
    # Destinations
    #
    # -- The list of destinations where telemetry data will be sent.
    # See the [destinations documentation](https://github.com/grafana/k8s-monitoring-helm/blob/main/charts/k8s-monitoring/docs/destinations/README.md) for more information.
    # @section -- Destinations
    destinations:
    ## OPSTELLA_CUSTOMIZE: Destination to Mimir and Loki
    - name: metricsService
    type: prometheus
    url: https://${GRAFANA_MIMIR_DOMAIN}/api/v1/push
    tenantId: "${ALLOY_COLLECT_TENANT_ID}"
    - name: logsService
    type: loki
    url: https://${GRAFANA_LOKI_DOMAIN}/loki/api/v1/push
    tenantId: "${ALLOY_COLLECT_TENANT_ID}"
    ######################################################################################################################
    #
    # Features
    #
    #########------------------------------------------------------------------------------------------###################
    ## Metrics
    # -- Cluster Monitoring enables observability and monitoring for your Kubernetes Cluster itself.
    # Requires a destination that supports metrics.
    # To see the valid options, please see the [Cluster Monitoring feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-cluster-metrics).
    # @default -- Disabled
    # @section -- Features - Cluster Metrics
    clusterMetrics:
    ## OPSTELLA_CUSTOMIZE: Enable Kubernetes Cluster Metrics
    enabled: true
    ### Scraping Metrics Series ###
    kubelet:
    metricsTuning:
    useDefaultAllowList: true
    includeMetrics:
    - kubelet_volume_stats_available_bytes
    - kubelet_volume_stats_capacity_bytes
    cadvisor:
    metricsTuning:
    useDefaultAllowList: true
    includeMetrics:
    - container_spec_memory_reservation_limit_bytes
    - container_cpu_usage_seconds_total
    - container_cpu_cfs_throttled_periods_total
    - container_cpu_cfs_periods_total
    - container_memory_usage_bytes
    apiServer:
    metricsTuning:
    useDefaultAllowList: true
    kube-state-metrics:
    deploy: false ## HELM: Sub-Chart Condition // Prometheus Kube-State-Metrics // Explicitly Deploy
    enabled: false
    metricsTuning:
    useDefaultAllowList: true
    includeMetrics:
    - kube_deployment_created
    - kube_pod_status_ready
    - kube_pod_container_status_terminated
    - kube_pod_container_status_waiting
    - kube_pod_container_resource_requests_cpu_cores
    - kube_pod_container_resource_requests_memory_bytes
    - kube_persistentvolumeclaim_info
    - kube_persistentvolume_status_phase
    - kube_pod_container_status_restarts_total
    - kube_pod_container_status_ready
    - kube_pod_info
    - kube_persistentvolumeclaim_access_mode
    - kube_persistentvolumeclaim_status_phase
    node-exporter:
    deploy: true ## HELM: Sub-Chart Condition // Prometheus Node-Exporter // Explicitly Deploy
    enabled: true
    ### --- ###
    nameOverride: "prometheus-node-exporter" ## OPSTELLA_CUSTOMIZE: Distinguish that is NOT under Grafana
    fullnameOverride: "prometheus-node-exporter" ## OPSTELLA_CUSTOMIZE: Distinguish that is NOT under Grafana
    metricsTuning:
    useDefaultAllowList: true
    windows-exporter:
    deploy: false ## HELM/OPSTELLA_CUSTOMIZE: Sub-Chart Condition // Prometheus Windows-Exporter // Opstella doesn't (yet) support Windows Containers
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Annotation Autodiscovery enables gathering metrics from Kubernetes Pods and Services discovered by special annotations.
    # Requires a destination that supports metrics.
    # To see the valid options, please see the [Annotation Autodiscovery feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-annotation-autodiscovery).
    # @default -- Disabled
    # @section -- Features - Annotation Autodiscovery
    annotationAutodiscovery:
    enabled: true
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Prometheus Operator Objects enables the gathering of metrics from objects like Probes, PodMonitors, and
    # ServiceMonitors. Requires a destination that supports metrics.
    # To see the valid options, please see the [Prometheus Operator Objects feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-prometheus-operator-objects).
    # @default -- Disabled
    # @section -- Features - Prometheus Operator Objects
    prometheusOperatorObjects:
    enabled: true
    crds:
    deploy: true
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    #
    # Collectors (Alloy instances)
    #
    # An Alloy instance for collecting metrics.
    # To see additional valid options, please see the [Alloy Helm chart documentation](https://github.com/grafana/alloy/tree/main/operations/helm/charts/alloy).
    alloy-metrics:
    enabled: true
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Service Integrations enables gathering telemetry data for common services and applications deployed to Kubernetes.
    # To see the valid options, please see the [Service Integrations documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-integrations).
    # @default -- No integrations enabled
    # @section -- Features - Service Integrations
    integrations:
    alloy:
    instances:
    - name: alloy
    labelSelectors:
    app.kubernetes.io/name:
    - alloy-metrics
    metrics:
    tuning:
    useDefaultAllowList: false
    includeMetrics:
    - alloy_build_info
    #########------------------------------------------------------------------------------------------###################
    ## OPSTELLA_ASSUME Logs (Small Scale) - Kubernetes Cluster Events, etc.
    ## That's why using Alloy as single instance deployment (alloy-singleton)
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Cluster events.
    # Requires a destination that supports logs.
    # To see the valid options, please see the [Cluster Events feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-cluster-events).
    # @default -- Disabled
    # @section -- Features - Cluster Events
    clusterEvents:
    enabled: true
    #
    # Collectors (Alloy instances)
    #
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # An Alloy instance for data sources required to be deployed on a single replica.
    # To see additional valid options, please see the [Alloy Helm chart documentation](https://github.com/grafana/alloy/tree/main/operations/helm/charts/alloy).
    alloy-singleton:
    enabled: true
    #########------------------------------------------------------------------------------------------###################
    ## OPSTELLA_ASSUME Logs (Large Scale) - Pod Logs, etc.
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Pod logs.
    # Requires a destination that supports logs.
    # To see the valid options, please see the [Pod Logs feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-pod-logs).
    # @default -- Disabled
    # @section -- Features - Pod Logs
    podLogs:
    enabled: true
    #
    # Collectors (Alloy instances)
    #
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # An Alloy instance for collecting log data.
    # To see additional valid options, please see the [Alloy Helm chart documentation](https://github.com/grafana/alloy/tree/main/operations/helm/charts/alloy).
    alloy-logs:
    enabled: true
    ######################################################################################################################
    EOF
  4. Create Helm Values Configuration, create for 🟥 Production Workload Kubernetes Cluster

    (Ensure cluster name variables are loaded for Production Cluster)

    Terminal window
    cat <<EOF > $BASE_WORKING_DIR/helm-values/grafana-alloy-platform-prod-full-values.yaml
    cluster:
    # -- The name for this cluster.
    # @section -- Cluster
    name: "${GRAFANA_ALLOY_CLUSTER_NAME}"
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ## - kubernetesAPIService is not used in the new chart.
    ######################################################################################################################
    #
    # Destinations
    #
    # -- The list of destinations where telemetry data will be sent.
    # See the [destinations documentation](https://github.com/grafana/k8s-monitoring-helm/blob/main/charts/k8s-monitoring/docs/destinations/README.md) for more information.
    # @section -- Destinations
    destinations:
    ## OPSTELLA_CUSTOMIZE: Destination to Mimir and Loki
    - name: metricsService
    type: prometheus
    url: https://${GRAFANA_MIMIR_DOMAIN}/api/v1/push
    tenantId: "${ALLOY_COLLECT_TENANT_ID}"
    - name: logsService
    type: loki
    url: https://${GRAFANA_LOKI_DOMAIN}/loki/api/v1/push
    tenantId: "${ALLOY_COLLECT_TENANT_ID}"
    ######################################################################################################################
    #
    # Features
    #
    #########------------------------------------------------------------------------------------------###################
    ## Metrics
    # -- Cluster Monitoring enables observability and monitoring for your Kubernetes Cluster itself.
    # Requires a destination that supports metrics.
    # To see the valid options, please see the [Cluster Monitoring feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-cluster-metrics).
    # @default -- Disabled
    # @section -- Features - Cluster Metrics
    clusterMetrics:
    ## OPSTELLA_CUSTOMIZE: Enable Kubernetes Cluster Metrics
    enabled: true
    ### Scraping Metrics Series ###
    kubelet:
    metricsTuning:
    useDefaultAllowList: true
    includeMetrics:
    - kubelet_volume_stats_available_bytes
    - kubelet_volume_stats_capacity_bytes
    cadvisor:
    metricsTuning:
    useDefaultAllowList: true
    includeMetrics:
    - container_spec_memory_reservation_limit_bytes
    - container_cpu_usage_seconds_total
    - container_cpu_cfs_throttled_periods_total
    - container_cpu_cfs_periods_total
    - container_memory_usage_bytes
    apiServer:
    metricsTuning:
    useDefaultAllowList: true
    kube-state-metrics:
    deploy: false ## HELM: Sub-Chart Condition // Prometheus Kube-State-Metrics // Explicitly Deploy
    enabled: false
    metricsTuning:
    useDefaultAllowList: true
    includeMetrics:
    - kube_deployment_created
    - kube_pod_status_ready
    - kube_pod_container_status_terminated
    - kube_pod_container_status_waiting
    - kube_pod_container_resource_requests_cpu_cores
    - kube_pod_container_resource_requests_memory_bytes
    - kube_persistentvolumeclaim_info
    - kube_persistentvolume_status_phase
    - kube_pod_container_status_restarts_total
    - kube_pod_container_status_ready
    - kube_pod_info
    - kube_persistentvolumeclaim_access_mode
    - kube_persistentvolumeclaim_status_phase
    node-exporter:
    deploy: true ## HELM: Sub-Chart Condition // Prometheus Node-Exporter // Explicitly Deploy
    enabled: true
    ### --- ###
    nameOverride: "prometheus-node-exporter" ## OPSTELLA_CUSTOMIZE: Distinguish that is NOT under Grafana
    fullnameOverride: "prometheus-node-exporter" ## OPSTELLA_CUSTOMIZE: Distinguish that is NOT under Grafana
    metricsTuning:
    useDefaultAllowList: true
    windows-exporter:
    deploy: false ## HELM/OPSTELLA_CUSTOMIZE: Sub-Chart Condition // Prometheus Windows-Exporter // Opstella doesn't (yet) support Windows Containers
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Annotation Autodiscovery enables gathering metrics from Kubernetes Pods and Services discovered by special annotations.
    # Requires a destination that supports metrics.
    # To see the valid options, please see the [Annotation Autodiscovery feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-annotation-autodiscovery).
    # @default -- Disabled
    # @section -- Features - Annotation Autodiscovery
    annotationAutodiscovery:
    enabled: true
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Prometheus Operator Objects enables the gathering of metrics from objects like Probes, PodMonitors, and
    # ServiceMonitors. Requires a destination that supports metrics.
    # To see the valid options, please see the [Prometheus Operator Objects feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-prometheus-operator-objects).
    # @default -- Disabled
    # @section -- Features - Prometheus Operator Objects
    prometheusOperatorObjects:
    enabled: true
    crds:
    deploy: true
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    #
    # Collectors (Alloy instances)
    #
    # An Alloy instance for collecting metrics.
    # To see additional valid options, please see the [Alloy Helm chart documentation](https://github.com/grafana/alloy/tree/main/operations/helm/charts/alloy).
    alloy-metrics:
    enabled: true
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Service Integrations enables gathering telemetry data for common services and applications deployed to Kubernetes.
    # To see the valid options, please see the [Service Integrations documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-integrations).
    # @default -- No integrations enabled
    # @section -- Features - Service Integrations
    integrations:
    alloy:
    instances:
    - name: alloy
    labelSelectors:
    app.kubernetes.io/name:
    - alloy-metrics
    metrics:
    tuning:
    useDefaultAllowList: false
    includeMetrics:
    - alloy_build_info
    #########------------------------------------------------------------------------------------------###################
    ## OPSTELLA_ASSUME Logs (Small Scale) - Kubernetes Cluster Events, etc.
    ## That's why using Alloy as single instance deployment (alloy-singleton)
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Cluster events.
    # Requires a destination that supports logs.
    # To see the valid options, please see the [Cluster Events feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-cluster-events).
    # @default -- Disabled
    # @section -- Features - Cluster Events
    clusterEvents:
    enabled: true
    #
    # Collectors (Alloy instances)
    #
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # An Alloy instance for data sources required to be deployed on a single replica.
    # To see additional valid options, please see the [Alloy Helm chart documentation](https://github.com/grafana/alloy/tree/main/operations/helm/charts/alloy).
    alloy-singleton:
    enabled: true
    #########------------------------------------------------------------------------------------------###################
    ## OPSTELLA_ASSUME Logs (Large Scale) - Pod Logs, etc.
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # -- Pod logs.
    # Requires a destination that supports logs.
    # To see the valid options, please see the [Pod Logs feature documentation](https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring/charts/feature-pod-logs).
    # @default -- Disabled
    # @section -- Features - Pod Logs
    podLogs:
    enabled: true
    #
    # Collectors (Alloy instances)
    #
    ## CHART_NOTE: Given from v1 to v2 Migration Tool
    ##
    # An Alloy instance for collecting log data.
    # To see additional valid options, please see the [Alloy Helm chart documentation](https://github.com/grafana/alloy/tree/main/operations/helm/charts/alloy).
    alloy-logs:
    enabled: true
    ######################################################################################################################
    EOF
  1. Add Grafana Helm Repository

    Terminal window
    helm repo add grafana https://grafana.github.io/helm-charts
    helm repo update

Ensure you have defined and loaded your Global Shell Variables as described in Shell Variables.

  1. Install Grafana Alloy (Platform) on 🟢 Management Kubernetes Cluster

    Ensure you have defined and loaded your Global Shell Variables as described in Shell Variables.

    Terminal window
    source $HOME/opstella-installation/shell-values/kubernetes/management_cluster.vars.sh
  2. Install Grafana Alloy (Platform) on 🟢 Management Kubernetes Cluster

    Terminal window
    helm upgrade --install grafana-alloy-platform grafana/k8s-monitoring \
    --version 2.0.16 \
    --namespace observability-agents \
    -f $HOME/opstella-installation/helm-values/grafana-alloy-platform-management-full-values.yaml
  1. Connect to 🟦 Non-Production Kubernetes Cluster ; i.e w/ Kubeconfig File

    Ensure you have defined and loaded your Global Shell Variables as described in Shell Variables.

    Terminal window
    source $HOME/opstella-installation/shell-values/kubernetes/nonprod_cluster.vars.sh
  2. Install Grafana Alloy (Platform) on 🟦 Non-Production Kubernetes Cluster

    Terminal window
    helm upgrade --install grafana-alloy-platform grafana/k8s-monitoring \
    --version 2.0.16 \
    --namespace observability-agents \
    -f $HOME/opstella-installation/helm-values/grafana-alloy-platform-nonprod-full-values.yaml
  1. Connect to 🟥 Production Kubernetes Cluster ; i.e w/ Kubeconfig File

    Ensure you have defined and loaded your Global Shell Variables as described in Shell Variables.

    Terminal window
    source $HOME/opstella-installation/shell-values/kubernetes/prod_cluster.vars.sh
  2. Install Grafana Alloy (Platform) on 🟥 Production Kubernetes Cluster

    Terminal window
    helm upgrade --install grafana-alloy-platform grafana/k8s-monitoring \
    --version 2.0.16 \
    --namespace observability-agents \
    -f $HOME/opstella-installation/helm-values/grafana-alloy-platform-prod-full-values.yaml
  1. Get Pods Status

    Terminal window
    kubectl get pods -n observability-agents

    💡 Grafana Alloy and all of sub-components should be Running

    NAME READY STATUS RESTARTS AGE
    ... (deducted)
    grafana-alloy-platform-alloy-logs-XXXXXXX-YYYYY 2/2 Running 0 Xd
    grafana-alloy-platform-alloy-logs-XXXXXXX-YYYYY 2/2 Running 0 Xd
    grafana-alloy-platform-alloy-logs-XXXXXXX-YYYYY 2/2 Running 0 Xd
    grafana-alloy-platform-alloy-logs-XXXXXXX-YYYYY 2/2 Running 0 Xd
    grafana-alloy-platform-alloy-logs-XXXXXXX-YYYYY 2/2 Running 0 Xd
    grafana-alloy-platform-alloy-metrics-0 2/2 Running 0 Xd
    grafana-alloy-platform-alloy-singleton-XXXXXXX-YYYYY 2/2 Running 0 Xd
    prometheus-node-exporter-YYYYY 1/1 Running 0 Xd
    prometheus-node-exporter-YYYYY 1/1 Running 0 Xd
    prometheus-node-exporter-YYYYY 1/1 Running 0 Xd
    prometheus-node-exporter-YYYYY 1/1 Running 0 Xd
    prometheus-node-exporter-YYYYY 1/1 Running 0 Xd

    💡 Every Grafana Alloy Pod runs 2 Containers (alloy and config-reloader), so its READY Column reads 2/2. prometheus-node-exporter runs 1 Container.

    💡 alloy-logs and prometheus-node-exporter are DaemonSets — there is 1 Pod of each per schedulable Kubernetes Node, so the number of Pods differs per Kubernetes Cluster.

  2. Confirm the Metrics arrived at Grafana Mimir

    Pod Status alone does not prove the Telemetry is being delivered — Grafana Alloy keeps every Pod Running even when the Destinations are unreachable. Ask Grafana Mimir instead,

    Terminal window
    curl -s -H "X-Scope-OrgID: ${ALLOY_COLLECT_TENANT_ID}" \
    "https://${GRAFANA_MIMIR_DOMAIN}/prometheus/api/v1/label/cluster/values"

    💡 The Response lists the GRAFANA_ALLOY_CLUSTER_NAME of every Kubernetes Cluster that has reported so far.

    {"status":"success","data":["k8s-cluster-management"]}
    Terminal window
    curl -s -H "X-Scope-OrgID: ${ALLOY_COLLECT_TENANT_ID}" \
    "https://${GRAFANA_MIMIR_DOMAIN}/prometheus/api/v1/query?query=count(up)"

    💡 count(up) should be a non-zero Number.

  3. Confirm the Logs arrived at Grafana Loki

    Terminal window
    curl -sG -H "X-Scope-OrgID: ${ALLOY_COLLECT_TENANT_ID}" \
    --data-urlencode "query=count_over_time({cluster=\"${GRAFANA_ALLOY_CLUSTER_NAME}\"}[5m])" \
    "https://${GRAFANA_LOKI_DOMAIN}/loki/api/v1/query"

    💡 The Response should carry at least one Result with a non-zero Value. An empty "result":[] means no Log Line of this Kubernetes Cluster has been written to Grafana Loki.

Finished?

Use the below navigation to proceed