- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.2k
Send Prometheus metrics to Grafana Cloud #2994
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 }} | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| # Values for charts linera-validator for local validators. | ||
|  | ||
| # Linera | ||
| lineraImage: "" # Is set by helmfile. | ||
| lineraImage: {{ env "LINERA_HELMFILE_LINERA_IMAGE" | default "linera:latest" }} | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for this. I'm not entirely sure if this is better or worse to be honest. On the one hand there is less indirection on the other hand configurable variables are now in more places. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it definitely looks better/less confusing than just an empty string, tbh 🤔 at least now you know what the default for this is supposed to be | ||
| lineraImagePullPolicy: Never | ||
| logLevel: "debug" | ||
| proxyPort: 19100 | ||
| metricsPort: 21100 | ||
| numShards: 10 | ||
| numShards: {{ env "LINERA_HELMFILE_SET_NUM_SHARDS" | default 10 }} | ||
|  | ||
| # Loki | ||
| loki-stack: | ||
|  | @@ -40,6 +40,26 @@ kube-prometheus-stack: | |
| - grafana-piechart-panel | ||
| prometheus: | ||
| prometheusSpec: | ||
| {{- if .Values.writeToGrafanaCloud }} | ||
| scrapeInterval: 90s | ||
| remoteWrite: | ||
| - url: https://prometheus-prod-13-prod-us-east-0.grafana.net/api/prom/push | ||
| basicAuth: | ||
| username: | ||
| name: grafana-cloud-auth-secret | ||
| key: username | ||
| password: | ||
| name: grafana-cloud-auth-secret | ||
| key: password | ||
| writeRelabelConfigs: | ||
| - sourceLabels: [__name__] | ||
| regex: (apiextensions|apiserver|csi|kube|kubelet|kubernetes|node|prober|prometheus|rest|storage|volume|etcd|net|grafana|authentication|code|workqueue|cluster|go|alertmanager|authorization|namespace|scrape|up|field|registered|process|scylla).+ | ||
| action: drop | ||
| - regex: endpoint|instance|namespace|pod|prometheus|prometheus_replica|service|name|resource|id | ||
| action: labeldrop | ||
| externalLabels: | ||
| validator: {{ .Values.validatorLabel }} | ||
| {{- end }} | ||
| retention: 2d | ||
| retentionSize: 1GB | ||
| storageSpec: | ||
|  | @@ -101,5 +121,5 @@ environment: "kind" | |
|  | ||
| # Validator | ||
| validator: | ||
| serverConfig: "" # Is set by helmfile. | ||
| genesisConfig: "" # Is set by helmfile. | ||
| serverConfig: {{ env "LINERA_HELMFILE_SET_SERVER_CONFIG" | default "working/server_1.json" }} | ||
| genesisConfig: {{ env "LINERA_HELMFILE_SET_GENESIS_CONFIG" | default "working/genesis.json" }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if this isn't specified (for example external validators which use Kuberentes?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently changing this to only be created if
writeToGrafanaCloudistrue, which will only happen for internal validators