1. Operate Private Cloud
  2. Observability

Monitor Private Cloud

Private Cloud components expose metrics that can be scraped by Prometheus. This page will guide you how to monitor the Private Cloud components with Prometheus and Grafana community chart.

Provision the Pulsar cluster

Follow the Quick Start to install the sn-operator and provision the Pulsar cluster.

Note

Make sure that use the same metadata.name for each component because this will be used for the label cloud_streamnative_io_cluster. For example, if you want to create a cluster called the pulsar-cluster, you should use the pulsar-cluster as the name for all components and specify at the metadata.name.

Install monitoring stacks

Add helm repo

  • Create a namespace for monitoring stacks
kubectl create ns monitor
  • Add prometheus and grafana helm repos
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts

Install the Prometheus community chart

helm install prometheus prometheus-community/prometheus -n monitor --set alertmanager.enabled=false --set kube-state-metrics.enabled=false --set prometheus-pushgateway.enabled=false

Note

Fow detailed prometheus-community chart configurations, can refer the configuration.

Install the Grafana chart

helm install grafana grafana/grafana -n monitor --set image.repository=streamnative/private-cloud-grafana --set image.tag=0.1.1

Note

Fow detailed Grafana chart configurations, can refer the configuration.

Access the Grafana dashboards

  • Expose the Grafana service
kubectl expose svc grafana --name grafana-external -n monitor --port 3000 --target-port 3000 --type LoadBalancer
  • Get the Grafana password
kubectl get secret --namespace monitor grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
  • Access the Grafana
kubectl get svc -n monitor --field-selector metadata.name=grafana-external
Previous
migrate-to-sn-images