Fix filtering of log lines
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
This commit is contained in:
parent
b02aee6816
commit
efea1c5054
@ -31,11 +31,10 @@ data:
|
|||||||
replacement = "${1}/${2}-${3}"
|
replacement = "${1}/${2}-${3}"
|
||||||
target_label = "job"
|
target_label = "job"
|
||||||
}
|
}
|
||||||
// rule {
|
rule {
|
||||||
// source_labels = ["__meta_kubernetes_pod_container_port_name"]
|
target_label = "cluster"
|
||||||
// regex="http-metrics"
|
replacement = "{{- .Values.clusterName -}}"
|
||||||
// action = "keep"
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logs
|
// Logs
|
||||||
@ -55,7 +54,7 @@ data:
|
|||||||
|
|
||||||
{{- if not (empty .Values.logs.retain) }}
|
{{- if not (empty .Values.logs.retain) }}
|
||||||
stage.match {
|
stage.match {
|
||||||
selector = "{cluster=\"{{- .Values.clusterName -}}\"} !~ \"{{ join "|" .Values.logs.retain }}\""
|
selector = "{cluster=\"{{- .Values.clusterName -}}\", namespace=\"{{- .Values.lokiNamespace -}}\"} !~ \"{{ join "|" .Values.logs.retain }}\""
|
||||||
action = "drop"
|
action = "drop"
|
||||||
}
|
}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -5,6 +5,7 @@ namespacesToMonitor:
|
|||||||
- tempo
|
- tempo
|
||||||
# The name of the cluster where this will be installed
|
# The name of the cluster where this will be installed
|
||||||
clusterName: "meta-monitoring"
|
clusterName: "meta-monitoring"
|
||||||
|
lokiNamespace: "loki"
|
||||||
httpPort: 3100
|
httpPort: 3100
|
||||||
|
|
||||||
# Set to true to write logs, metrics or traces to Grafana Cloud
|
# Set to true to write logs, metrics or traces to Grafana Cloud
|
||||||
|
Loading…
x
Reference in New Issue
Block a user