|
| 1 | +# Monitoring in KubeAid |
| 2 | + |
| 3 | +KubeAid monitoring has two layers: |
| 4 | + |
| 5 | +1. **Metrics** — `kube-prometheus` (Prometheus, Alertmanager, Grafana) |
| 6 | +2. **Logs** — one of OpenObserve, Graylog, or OpenSearch + Kibana |
| 7 | + |
| 8 | +Per-stack setup and operations are documented in each application's Helm chart README (linked below). |
| 9 | + |
| 10 | +## Metrics: kube-prometheus |
| 11 | + |
| 12 | +[kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) is the default monitoring stack. It provides: |
| 13 | + |
| 14 | +- **Prometheus** — scrapes metrics from ServiceMonitors, PodMonitors, and exporters across the cluster |
| 15 | +- **Alertmanager** — routes metric-based alerts to notification channels |
| 16 | +- **Grafana** — dashboards for metrics visualization |
| 17 | + |
| 18 | +Configuration is managed per cluster via Jsonnet (`<cluster-name>-vars.jsonnet`) and built into Kubernetes manifests. |
| 19 | +See [Prometheus Configuration](./kubeaid/prometheus-configuration.md) for details. |
| 20 | + |
| 21 | +```mermaid |
| 22 | +flowchart LR |
| 23 | + subgraph Cluster["Kubernetes Cluster"] |
| 24 | + Apps["Apps and System Components"] |
| 25 | + Exporters["Prometheus Exporters / ServiceMonitors"] |
| 26 | + end |
| 27 | +
|
| 28 | + subgraph Metrics["kube-prometheus"] |
| 29 | + Prom["Prometheus"] |
| 30 | + AM["Alertmanager"] |
| 31 | + Graf["Grafana"] |
| 32 | + end |
| 33 | +
|
| 34 | + Apps --> Exporters |
| 35 | + Exporters --> Prom |
| 36 | + Prom --> AM |
| 37 | + Prom --> Graf |
| 38 | +``` |
| 39 | + |
| 40 | +## Log monitoring |
| 41 | + |
| 42 | +Log monitoring runs alongside `kube-prometheus`. Each option handles log ingestion, search, and log-based alerting on |
| 43 | +its own — none of them replace Prometheus for metrics. |
| 44 | + |
| 45 | +| Option | Scope | Log collection | Prometheus integration | Application docs | |
| 46 | +| ------ | ----- | -------------- | ---------------------- | ---------------- | |
| 47 | +| OpenObserve | Logs, metrics, and alerts | OpenTelemetry (`OTLP`) | Pulls metrics and alerts from Prometheus; alerts on logs | [openobserve](../argocd-helm-charts/openobserve/README.md) | |
| 48 | +| Graylog | Logs only | Fluent Bit, Fluentd, Beats, Syslog, GELF, etc. | None (metrics stay in kube-prometheus) | [graylog](../argocd-helm-charts/graylog/README.md) | |
| 49 | +| OpenSearch + Kibana | Logs only (ELK-style) | Fluent Bit, Fluentd, OpenTelemetry Collector, etc. | None (metrics stay in kube-prometheus) | [opensearch](../argocd-helm-charts/opensearch/README.md), [opensearch-dashboards](../argocd-helm-charts/opensearch-dashboards/charts/opensearch-dashboards/README.md) | |
| 50 | + |
| 51 | +### OpenObserve |
| 52 | + |
| 53 | +OpenObserve uses the **OpenTelemetry** standard for ingestion. It can ingest logs via OpenTelemetry Collector, pull |
| 54 | +metrics and alerts from Prometheus, and provide log-based search and alerting. |
| 55 | + |
| 56 | +- [OpenObserve Helm chart](../argocd-helm-charts/openobserve/README.md) |
| 57 | +- [OpenObserve Collector reference](../argocd-helm-charts/openobserve/charts/openobserve-collector/docs/README.md) |
| 58 | + |
| 59 | +### Graylog |
| 60 | + |
| 61 | +Graylog focuses on **log collection and management**. Logs are shipped using agents such as Fluent Bit or other |
| 62 | +supported inputs. Graylog does not integrate with Prometheus for metrics or alerting. |
| 63 | + |
| 64 | +- [Graylog Helm chart](../argocd-helm-charts/graylog/README.md) |
| 65 | + |
| 66 | +### OpenSearch and Kibana |
| 67 | + |
| 68 | +OpenSearch with Kibana (or OpenSearch Dashboards) is an alternative to Graylog: centralized log storage, search, and |
| 69 | +visualization without a Graylog management layer. KubeAid includes Helm charts for OpenSearch and OpenSearch |
| 70 | +Dashboards; Kibana itself is not packaged. |
| 71 | + |
| 72 | +- [OpenSearch Helm chart](../argocd-helm-charts/opensearch/README.md) |
| 73 | +- [OpenSearch Dashboards Helm chart](../argocd-helm-charts/opensearch-dashboards/charts/opensearch-dashboards/README.md) |
| 74 | + |
| 75 | +```mermaid |
| 76 | +flowchart LR |
| 77 | + subgraph Sources["Log sources"] |
| 78 | + Apps["Applications"] |
| 79 | + Collectors["Fluent Bit / OTel Collector"] |
| 80 | + end |
| 81 | +
|
| 82 | + subgraph Logs["Log stack (one of)"] |
| 83 | + OO["OpenObserve"] |
| 84 | + GL["Graylog"] |
| 85 | + OSD["OpenSearch + Dashboards"] |
| 86 | + end |
| 87 | +
|
| 88 | + subgraph Metrics["kube-prometheus"] |
| 89 | + Prom["Prometheus"] |
| 90 | + end |
| 91 | +
|
| 92 | + Collectors --> OO |
| 93 | + Collectors --> GL |
| 94 | + Collectors --> OSD |
| 95 | + Apps --> Collectors |
| 96 | + Prom -. metrics and alerts .-> OO |
| 97 | +``` |
| 98 | + |
| 99 | +## Alerting strategy |
| 100 | + |
| 101 | +- **Metric alerts** — Prometheus rules evaluated by Prometheus, routed by Alertmanager |
| 102 | +- **Log alerts** — evaluated by the log stack (OpenObserve, Graylog, or OpenSearch) |
| 103 | + |
| 104 | +Metrics tell you that something is unhealthy; logs help explain why. |
| 105 | + |
| 106 | +## Further reading |
| 107 | + |
| 108 | +- [Prometheus Configuration](./kubeaid/prometheus-configuration.md) — kube-prometheus setup and Jsonnet build |
| 109 | +- [Prometheus Namespaces](./operations/monitoring/prometheus-namespaces.md) — namespace scrape scope |
| 110 | +- [Pod Autoscaling](./operations/monitoring/pod-autoscaling.md) — HPA with custom metrics from Prometheus |
0 commit comments