Add initial project structure and configuration for monitoring suite
- Create .gitignore to exclude Python-generated files and virtual environments - Add .python-version for Python version management - Initialize README.md with project description and usage instructions - Implement alloy.river configuration for Grafana Alloy observability - Set up grafana.ini for Grafana configuration - Configure dashboards.yml for automatic dashboard loading in Grafana - Define datasources.yml for connecting Grafana to Prometheus, Loki, and Tempo - Establish loki.yaml configuration for Loki logging - Set up prometheus.yml for Prometheus metrics collection - Configure tempo.yaml for Tempo tracing - Create docker-compose.yml for orchestrating services - Develop init.sh script for initializing project directories and services - Implement main.py as the entry point for the application - Define pyproject.toml for project metadata and dependencies - Update uv.lock for dependency management
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
apiVersion: 1
|
||||
|
||||
# Configuración automática de datasources para Grafana
|
||||
# Conexión directa a Prometheus, Loki y Tempo
|
||||
datasources:
|
||||
# Prometheus para métricas
|
||||
- name: Prometheus
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: http://prometheus:9090
|
||||
uid: prometheus
|
||||
isDefault: true
|
||||
editable: false
|
||||
jsonData:
|
||||
httpMethod: POST
|
||||
prometheusType: Prometheus
|
||||
prometheusVersion: 2.40.0
|
||||
cacheLevel: 'High'
|
||||
disableRecordingRules: false
|
||||
incrementalQueryOverlapWindow: 10m
|
||||
exemplarTraceIdDestinations:
|
||||
- name: TraceID
|
||||
datasourceUid: tempo
|
||||
urlDisplayLabel: "View Trace"
|
||||
|
||||
# Loki para logs
|
||||
- name: Loki
|
||||
type: loki
|
||||
access: proxy
|
||||
url: http://loki:3100
|
||||
uid: loki
|
||||
editable: false
|
||||
jsonData:
|
||||
maxLines: 1000
|
||||
derivedFields:
|
||||
- datasourceUid: tempo
|
||||
matcherRegex: "(?:traceID|trace_id|traceid)=([A-Fa-f0-9]+)"
|
||||
name: TraceID
|
||||
url: "$${__value.raw}"
|
||||
urlDisplayLabel: "View Trace"
|
||||
|
||||
# Tempo para trazas
|
||||
- name: Tempo
|
||||
type: tempo
|
||||
access: proxy
|
||||
url: http://tempo:3200
|
||||
uid: tempo
|
||||
editable: false
|
||||
jsonData:
|
||||
httpMethod: GET
|
||||
tracesToLogs:
|
||||
datasourceUid: loki
|
||||
tags: ['job', 'instance', 'pod', 'namespace', 'container']
|
||||
mappedTags: [
|
||||
{
|
||||
key: 'service.name',
|
||||
value: 'service'
|
||||
},
|
||||
{
|
||||
key: 'container.name',
|
||||
value: 'container'
|
||||
}
|
||||
]
|
||||
mapTagNamesEnabled: true
|
||||
spanStartTimeShift: '1h'
|
||||
spanEndTimeShift: '1h'
|
||||
filterByTraceID: true
|
||||
filterBySpanID: false
|
||||
tracesToMetrics:
|
||||
datasourceUid: prometheus
|
||||
tags: [
|
||||
{
|
||||
key: 'service.name',
|
||||
value: 'service'
|
||||
},
|
||||
{
|
||||
key: 'job'
|
||||
}
|
||||
]
|
||||
queries:
|
||||
- name: 'Request Rate'
|
||||
query: 'rate(traces_service_graph_request_total{$$__tags}[5m])'
|
||||
- name: 'Error Rate'
|
||||
query: 'rate(traces_service_graph_request_failed_total{$$__tags}[5m])'
|
||||
- name: 'Duration P99'
|
||||
query: 'histogram_quantile(0.99, rate(traces_spanmetrics_latency_bucket{$$__tags}[5m]))'
|
||||
serviceMap:
|
||||
datasourceUid: prometheus
|
||||
search:
|
||||
hide: false
|
||||
nodeGraph:
|
||||
enabled: true
|
||||
lokiSearch:
|
||||
datasourceUid: loki
|
||||
Reference in New Issue
Block a user