modificato conf alloy e compose x hostname in grafana
This commit is contained in:
@@ -63,10 +63,26 @@ prometheus.exporter.unix "host" {
|
||||
rootfs_path = "/host/root"
|
||||
}
|
||||
|
||||
// Relabel configuration for Prometheus metrics
|
||||
prometheus.relabel "host_metrics" {
|
||||
forward_to = [prometheus.remote_write.mimir.receiver]
|
||||
|
||||
rule {
|
||||
source_labels = ["__address__"]
|
||||
target_label = "instance"
|
||||
replacement = "vm1"
|
||||
}
|
||||
|
||||
rule {
|
||||
target_label = "hostname"
|
||||
replacement = "vm1"
|
||||
}
|
||||
}
|
||||
|
||||
// Scrape metrics from the unix exporter
|
||||
prometheus.scrape "host" {
|
||||
targets = prometheus.exporter.unix.host.targets
|
||||
forward_to = [prometheus.remote_write.mimir.receiver]
|
||||
forward_to = [prometheus.relabel.host_metrics.receiver]
|
||||
}
|
||||
|
||||
// Write metrics to Mimir/Prometheus
|
||||
|
||||
Reference in New Issue
Block a user