update metrics port to look for metrics in the port name vs excluding ports

add some more log lines
This commit is contained in:
Edward Welch 2024-10-24 15:06:30 +00:00
parent c4af598b75
commit 58b438cdb5
No known key found for this signature in database
GPG Key ID: 9A98721A6BB4377B
2 changed files with 5 additions and 3 deletions

View File

@ -120,9 +120,9 @@ data:
replacement = "{{- .Values.clusterLabelValue -}}" replacement = "{{- .Values.clusterLabelValue -}}"
} }
rule { rule {
source_labels = ["__meta_kubernetes_pod_container_port_number"] source_labels = ["__meta_kubernetes_pod_container_port_name"]
action = "drop" action = "keep"
regex = "9095" regex = ".*metrics.*"
} }
} }

View File

@ -66,9 +66,11 @@ logs:
# The lines matching these will be kept in Loki # The lines matching these will be kept in Loki
retain: retain:
# This shows the queries # This shows the queries
- executing query
- caller=metrics.go - caller=metrics.go
# This shows any errors # This shows any errors
- level=error - level=error
- level=warn
# Log lines for delete requests # Log lines for delete requests
- delete request for user added - delete request for user added
- Started processing delete request - Started processing delete request