Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): update values.yaml path for prometheus #757

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions docs/02-Installation/04-Grafana/prometheus-unmanaged.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,44 +15,42 @@
helm repo update
```

2. Save **[these Prometheus values](https://github.com/microsoft/retina/blob/main/deploy/legacy/prometheus/values.yaml)** below to `deploy/legacy/prometheus/values.yaml`

3. Install the Prometheus chart
2. Install the Prometheus chart

```shell
helm install prometheus -n kube-system -f deploy/prometheus/values.yaml prometheus-community/kube-prometheus-stack
helm install prometheus -n kube-system -f deploy/legacy/prometheus/values.yaml prometheus-community/kube-prometheus-stack
```

Or if you already have the chart installed, upgrade how you see fit, providing the new job name as an additional scrape config, ex:

```shell
helm upgrade prometheus -n kube-system -f deploy/prometheus/values.yaml prometheus-community/kube-prometheus-stack
helm upgrade prometheus -n kube-system -f deploy/legacy/prometheus/values.yaml prometheus-community/kube-prometheus-stack
```

Note: Grafana and kube-state metrics may schedule on Windows nodes, the current chart doesn't have node affinity for those components. Some manual intervention may be required.

6. Verify that the Retina Pods are being scraped by port-forwarding the Prometheus server:
3. Verify that the Retina Pods are being scraped by port-forwarding the Prometheus server:

```shell
kubectl port-forward --namespace kube-system svc/prometheus-operated 9090
```

7. Then go to [http://localhost:9090/targets](http://localhost:9090/targets) to see the Retina Pods being discovered and scraped:
4. Then go to [http://localhost:9090/targets](http://localhost:9090/targets) to see the Retina Pods being discovered and scraped:

![alt text](../img/prometheus-retina-pods.png)

## Configuring Grafana

Create a Grafana instance at [grafana.com](https://www.grafana.com) and follow [Configuring Grafana](./grafana.md), or use the one installed from above.

8. Get the Grafana password:
1. Get the Grafana password:

```shell
kubectl get secret -n kube-system prometheus-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
```

9. Import the new dashboard from **[here](https://grafana.com/grafana/dashboards/18814/)**.
2. Import the new dashboard from **[here](https://grafana.com/grafana/dashboards/18814/)**.

10. Metrics should be visible:
3. Metrics should be visible:

![alt text](../img/grafana-dashboard-metrics.png)
Loading