k8s/monitoring: add prometheus grafana loki observability
- Loki log aggregation (MinIO backed, 10-day retention) - Promtail daemonset (pod + talos journal logs) - Prometheus + kube-state-metrics - Grafana dashboards (6-row template per service)
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
service: forgejo
|
||||
display_name: "Forgejo"
|
||||
namespace: forgejo
|
||||
service_type: web-app
|
||||
folder: "Forgejo"
|
||||
jobs: [forgejo]
|
||||
metrics:
|
||||
prefix: forgejo
|
||||
up_selector: 'job="forgejo"'
|
||||
rate:
|
||||
metric: forgejo_http_request_total
|
||||
labels: [method, status]
|
||||
duration:
|
||||
metric: forgejo_http_request_duration_seconds
|
||||
type: histogram
|
||||
unit: s
|
||||
error:
|
||||
metric: forgejo_http_request_total
|
||||
filter: 'status=~"5.."'
|
||||
domain:
|
||||
- metric: forgejo_repositories_total
|
||||
kind: gauge
|
||||
- metric: forgejo_users_total
|
||||
kind: gauge
|
||||
- metric: forgejo_git_operations_total
|
||||
kind: counter
|
||||
labels: [operation_type]
|
||||
- metric: forgejo_runner_tasks_total
|
||||
kind: counter
|
||||
labels: [status]
|
||||
correlation_ids: []
|
||||
logs:
|
||||
loki_namespace_selector: 'namespace="forgejo"'
|
||||
alerts:
|
||||
- name: HighErrorRate
|
||||
expr_template: rate_error_ratio
|
||||
threshold: 0.05
|
||||
for: 10m
|
||||
severity: warning
|
||||
Reference in New Issue
Block a user