diff --git a/loki/alloy.yaml b/loki/alloy.yaml index 3333d65..4e3da8a 100644 --- a/loki/alloy.yaml +++ b/loki/alloy.yaml @@ -112,8 +112,8 @@ data: } rule { - source_labels = ["__journal__hostname"] - target_label = "host" + target_label = "host" + replacement = sys.env("NODE_NAME") } rule { @@ -187,6 +187,12 @@ spec: ports: - containerPort: 12345 name: http + + env: + - name: NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName volumeMounts: - name: config