feat: metricas backend (1.3) + ServiceMonitor + dashboard + netpol monitoring; rename ingress acme
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
# Dashboard Grafana dos backends Athletic Map (auto-importado pelo sidecar via label grafana_dashboard)
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: athleticmap-dashboard
|
||||
namespace: monitoring
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
data:
|
||||
athleticmap-backends.json: |
|
||||
{
|
||||
"title": "Athletic Map — Backends",
|
||||
"uid": "athleticmap-backends",
|
||||
"tags": ["athleticmap"],
|
||||
"timezone": "browser",
|
||||
"schemaVersion": 39,
|
||||
"version": 1,
|
||||
"refresh": "30s",
|
||||
"time": { "from": "now-6h", "to": "now" },
|
||||
"templating": {
|
||||
"list": [
|
||||
{ "name": "datasource", "type": "datasource", "query": "prometheus", "hide": 0, "current": {} }
|
||||
]
|
||||
},
|
||||
"panels": [
|
||||
{
|
||||
"type": "timeseries", "title": "HTTP req/s por tenant",
|
||||
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 },
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
||||
"targets": [ { "expr": "sum(rate(http_server_requests_seconds_count[5m])) by (tenant)", "legendFormat": "{{tenant}}" } ]
|
||||
},
|
||||
{
|
||||
"type": "timeseries", "title": "p95 latencia (s) por tenant",
|
||||
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 0 },
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
||||
"targets": [ { "expr": "histogram_quantile(0.95, sum(rate(http_server_requests_seconds_bucket[5m])) by (le,tenant))", "legendFormat": "{{tenant}}" } ]
|
||||
},
|
||||
{
|
||||
"type": "timeseries", "title": "JVM heap usado (bytes) por tenant",
|
||||
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 8 },
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
||||
"targets": [ { "expr": "sum(jvm_memory_used_bytes{area=\"heap\"}) by (tenant)", "legendFormat": "{{tenant}}" } ]
|
||||
},
|
||||
{
|
||||
"type": "timeseries", "title": "CPU do processo por tenant",
|
||||
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 8 },
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
||||
"targets": [ { "expr": "sum(process_cpu_usage) by (tenant)", "legendFormat": "{{tenant}}" } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
# Scrape das metricas Prometheus dos backends Spring Boot (qualquer tenant: service label app=backend)
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: athleticmap-backends
|
||||
namespace: monitoring
|
||||
labels:
|
||||
release: monitoring
|
||||
spec:
|
||||
namespaceSelector:
|
||||
any: true
|
||||
selector:
|
||||
matchLabels:
|
||||
app: backend
|
||||
endpoints:
|
||||
- port: http
|
||||
path: /actuator/prometheus
|
||||
interval: 30s
|
||||
Reference in New Issue
Block a user