Monitoring Your Cluster

Kubehub includes a built-in monitoring stack so you can see what’s happening inside your cluster — logs, metrics, and Kubernetes events — without setting anything up yourself.

Enable monitoring

  1. In the Kubehub portal, open your cluster.
  2. Click Settings.
  3. Go to the Monitoring tab.
  4. Turn on the monitoring checkbox.

That’s it. The stack installs automatically.

What gets installed

When you enable monitoring, Kubehub adds these components to your cluster:

  • metrics-server — provides basic resource usage data (CPU, memory) for nodes and pods.
  • kube-state-metrics — exposes Kubernetes object state as metrics (pod status, deployment replicas, etc.).
  • Alloy — a lightweight collector from Grafana Labs that gathers logs and metrics. It runs in two modes:
    • Node Collector — runs on every node, collects node-level and pod-level data.
    • Cluster Collector — runs once per cluster, collects cluster-wide data like events and kube-state-metrics.

What data is collected

Logs

Job nameWhat it collectsHow to enableCollector
pod-logsApplication logs from your podsAnnotate your pod with logging.kubehub.io/enabled: "true"Alloy Node Collector
systemd-logsSystem logs from kubelet and containerd onlyAutomaticAlloy Node Collector
kubernetes-eventsKubernetes event objects (pod scheduling, restarts, etc.)AutomaticAlloy Cluster Collector
kubernetes-auditlogsAPI server audit logsAutomaticKubehub platform

Metrics

Job nameWhat it collectsHow to enableCollector
pod-metricsCustom metrics from your podsAnnotate your pod with metrics.kubehub.io/enabled: "true"Alloy Node Collector
kubelet-metricsKubelet performance and health dataAutomaticAlloy Node Collector
cadvisor-metricsContainer-level resource usage (CPU, memory, network)AutomaticAlloy Node Collector
kube-state-metricsKubernetes object state (deployments, pods, nodes, etc.)AutomaticAlloy Cluster Collector

Enabling pod-level collection

To collect logs or metrics from a specific pod, add the corresponding annotation to your pod spec:

apiVersion: v1
kind: Pod
metadata:
  name: my-app
  annotations:
    logging.kubehub.io/enabled: "true"    # for pod logs
    metrics.kubehub.io/enabled: "true"     # for pod metrics

You can add one or both annotations depending on what you need.

Data retention

  • Logs: retained for 2 days.
  • Metrics: retained for 3 days.

We may extend these durations in the future.

Querying your data

Click the Monitoring button at the top of the Kubehub portal. It opens Perses, a dashboard UI where you can query and visualize your logs and metrics.

Why not Grafana?

Grafana is great, but it doesn’t support the multi-tenant isolation we need for a hosted platform — every user’s data has to be fully separated. Perses gives us that isolation out of the box.

If you want Grafana anyway, you can install your own instance into your cluster. The monitoring data is accessible to any compatible tool running inside the cluster.

Architecture overview

flowchart LR
    ANC[Alloy Node Collector]
    ACC[Alloy Cluster Collector]
    L[Loki]
    P[Prometheus]
    UI[Perses UI]

    ANC -->|pod-logs, systemd-logs| L
    ANC -->|pod-metrics, kubelet-metrics, cadvisor-metrics| P
    ACC -->|kubernetes-events| L
    ACC -->|kube-state-metrics| P

    L --> UI
    P --> UI

Alloy Node Collectors run on every node and forward data to Loki (for logs) and Prometheus (for metrics). The Alloy Cluster Collector handles cluster-wide data. Perses connects to both backends to let you query and visualize everything.