Skip to content

Commit

Permalink
Update monitoring docs
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Sep 1, 2024
1 parent 0d10a6a commit 4778ea1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
11 changes: 3 additions & 8 deletions docs/setup/monitoring/builtin-prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ Let's install KubeDB with operator monitoring enabled.
$ helm install kubedb oci://ghcr.io/appscode-charts/kubedb \
--version {{< param "info.version" >}} \
--namespace kubedb --create-namespace \
--set kubedb-provisioner.monitoring.enabled=true \
--set kubedb-provisioner.monitoring.agent=prometheus.io/builtin \
--set kubedb-provisioner.monitoring.prometheus.namespace=monitoring \
--set kubedb-provisioner.monitoring.serviceMonitor.labels.release=prometheus
--set global.monitoring.agent=prometheus.io/builtin
```
**YAML (with Helm 3):**
Expand All @@ -53,10 +50,8 @@ $ helm install kubedb oci://ghcr.io/appscode-charts/kubedb \
$ helm template kubedb oci://ghcr.io/appscode-charts/kubedb \
--version {{< param "info.version" >}} \
--namespace kubedb --create-namespace \
--set kubedb-provisioner.monitoring.enabled=true \
--set kubedb-provisioner.monitoring.agent=prometheus.io/builtin \
--set kubedb-provisioner.monitoring.prometheus.namespace=monitoring \
--set kubedb-provisioner.monitoring.serviceMonitor.labels.release=prometheus | kubectl apply -f -
--no-hooks \
--set global.monitoring.agent=prometheus.io/builtin | kubectl apply -f -
```
This will add necessary annotations to `kubedb` service created in `kubedb` namespace. Prometheus server will scrape metrics using those annotations. Let's check which annotations are added to the service,
Expand Down
13 changes: 4 additions & 9 deletions docs/setup/monitoring/prometheus-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,8 @@ Let's install KubeDB operator with monitoring enabled.
$ helm install kubedb oci://ghcr.io/appscode-charts/kubedb \
--version {{< param "info.version" >}} \
--namespace kubedb --create-namespace \
--no-hooks \
--set monitoring.enabled=true \
--set monitoring.agent=prometheus.io/operator \
--set monitoring.prometheus.namespace=monitoring \
--set monitoring.serviceMonitor.labels.release=prometheus
--set global.monitoring.agent=prometheus.io/operator \
--set global.monitoring.serviceMonitor.labels.release=kube-prometheus-stack
```

**YAML (with Helm 3):**
Expand All @@ -55,10 +52,8 @@ $ helm template kubedb oci://ghcr.io/appscode-charts/kubedb \
--version {{< param "info.version" >}} \
--namespace kubedb --create-namespace \
--no-hooks \
--set monitoring.enabled=true \
--set monitoring.agent=prometheus.io/operator \
--set monitoring.prometheus.namespace=monitoring \
--set monitoring.serviceMonitor.labels.release=prometheus | kubectl apply -f -
--set global.monitoring.agent=prometheus.io/operator \
--set global.monitoring.serviceMonitor.labels.release=kube-prometheus-stack | kubectl apply -f -
```

This will create a `ServiceMonitor` crd with name `kubedb-servicemonitor` in `monitoring` namespace for monitoring endpoints of `kubedb` service. This `ServiceMonitor` will have label `release: prometheus` as we have provided it by `--servicemonitor-label` flag. This label will be used by Prometheus crd to select this `ServiceMonitor`.
Expand Down

0 comments on commit 4778ea1

Please sign in to comment.