Services managed by Stackable support monitoring via Prometheus.
Stackable does not currently provide Prometheus, instead we suggest using Prometheus operator.
Prometheus Operator can be installed via the Helm chart kube-prometheus-stack, which includes
both the Operator, and a basic Prometheus configuration that should be sufficient for basic use.
$ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
$ helm upgrade prometheus prometheus-community/kube-prometheus-stack --install --version 31.0.0When using the kube-prometheus-stack Helm chart (as above), an additional ServiceMonitor must be applied to the Kubernetes cluster, which discovers services registered to the Kubernetes cluster:
link:example$monitoring-servicemonitor.yaml[role=include]Prometheus should now be accessible inside of the Kubernetes cluster, and can be access can be forwarded using kubectl:
$ kubectl port-forward svc/prometheus-kube-prometheus-prometheus 9090Afterwards, we can go to http://localhost:9090/ to access the query UI.
An existing Prometheus installation can also be used to monitor Stackable services.
In this case, it should be configured to scrape Kubernetes Service objects with the label prometheus.io/scrape: "true".
For more details, see their official documentation for
<kubernetes_sd_config>.