Files
italiadatacenter/add-on/grafana.txt
alessandro 20d506407a primo
2026-07-17 09:42:52 +02:00

123 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Aggiungere repository Helm Grafana
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
----
kubectl create namespace grafana
----
grafana-values.yaml:
replicas: 1
adminUser: admin
adminPassword: KAYQE1QA7uwUZ8uI5
service:
type: ClusterIP
port: 80
persistence:
enabled: true
size: 10Gi
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
---
helm install grafana grafana/grafana -n grafana -f grafana-values.yaml
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: grafana
spec:
hostnames:
- tekton.italiadatacenter.com
parentRefs:
- name: main-gateway
namespace: nginx-gateway
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: grafana
port: 80
****************** TEST ****************************
Accesso alla UI Grafana
Aprire browser:
http://localhost:3000
Login:
user: admin
password: KAYQE1QA7uwUZ8uI5
link svc:
grafana.grafana.svc.cluster.local
---------------------------------------
Aggiungere InfluxDB come datasource
In Grafana:
Connections
Data Sources
Add data source
InfluxDB
Configurazione:
URL
http://influxdb:8086
Organization:
demo-org
Token:
my-super-token
Bucket:
demo-bucket
Salva.
6⃣ Test datasource
Click:
Save & Test
Se corretto:
Datasource is working
7⃣ Creare dashboard
In Grafana:
Create
Dashboard
Add panel
Query esempio (InfluxDB Flux):
from(bucket: "demo-bucket")
|> range(start: -1h)