feat(infra): grupo fleet-metrics — collect_host_metrics, format_prom_exposition, push_prom_remote, push_loki_stream, collect_battery_metrics + tipo PromSample (gopsutil; Android-safe: sin exec/pidfd, procesos via /proc)

This commit is contained in:
Egutierrez
2026-06-07 14:25:45 +02:00
parent 8742cb25be
commit d996542f88
14 changed files with 1055 additions and 2 deletions
+12
View File
@@ -0,0 +1,12 @@
package infra
// PromSample representa una unica serie de metrica en formato Prometheus:
// el nombre de la metrica, sus labels y un valor numerico.
//
// La label "instance" NO se incluye aqui: la añade el pusher remoto via
// extra_label cuando hace el push a VictoriaMetrics.
type PromSample struct {
Name string // nombre de metrica prometheus, ej "node_cpu_percent"
Labels map[string]string // labels de la serie, ej {"core":"0"} (sin la label "instance")
Value float64
}