add prometheus static labels fqdn

This commit is contained in:
Arne Teuke
2025-03-12 14:10:29 +01:00
parent 17aae3e03e
commit 0b2b6fedc2
2 changed files with 12 additions and 11 deletions

View File

@@ -61,10 +61,21 @@ prometheus.exporter.unix "system_metrics" {
prometheus.scrape "scrape_system" {
targets = prometheus.exporter.unix.system_metrics.targets
forward_to = [prometheus.remote_write.prometheus.receiver]
forward_to = [prometheus.process.metrics.receiver]
scrape_interval = "15s"
}
prometheus.process "metrics" {
stage.static_labels {
values = {
fqdn = constants.hostname,
service = "prometheus",
}
}
forward_to = [prometheus.remote_write.prometheus.receiver]
}
prometheus.remote_write "prometheus" {
endpoint {
url = "<%= @ay_prom_url %>"