-
Notifications
You must be signed in to change notification settings - Fork 772
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Send Prometheus metrics to Grafana Cloud (#2994)
## Motivation We're migrating our internal validators to send data to Grafana Cloud. ## Proposal Starting with the local setup. This was useful to test the required changes that we'll likely need for the actual internal validator setup. We probably won't want to send metrics to Grafana Cloud from local runs all the time (specially for cost reasons), so this is disabled by default. Grafana Cloud credentials are stored in a secret within GCP's Secret Manager. Since Grafana Cloud will be for our internal validators, then I figured storing the secret on GCP made sense. ## Test Plan Ran locally with `linera net up --kubernetes`, and saw the metrics in our Grafana Cloud instance: ![Screenshot 2024-12-02 at 11.37.04.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/HlciHFAoHZW62zn13apJ/4b46c8bc-a5d3-4aad-9e3f-151cf44be947.png) ## Release Plan If we want to start sending metrics to Grafana Cloud from our devnet/testnet, then: - These changes should be backported to the latest `devnet` branch - These changes should be backported to the latest `testnet` branch, then
- Loading branch information
Showing
3 changed files
with
48 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
kubernetes/linera-validator/templates/grafana-cloud-auth-secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.writeToGrafanaCloud }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: grafana-cloud-auth-secret | ||
type: kubernetes.io/basic-auth | ||
stringData: | ||
username: {{ .Values.grafanaCloudUsername | quote }} | ||
password: {{ .Values.grafanaCloudAPIToken | quote }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters