This commit is contained in:
alessandro
2026-07-17 09:42:52 +02:00
commit 20d506407a
93 changed files with 14526 additions and 0 deletions

123
add-on/grafana.txt Normal file
View File

@@ -0,0 +1,123 @@
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)