From b13ecf05dd380bdb6466ec17a25389dfdbed022e Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Sat, 7 Mar 2026 13:45:12 -0800 Subject: [PATCH 1/2] Fix 1Password Connect numeric log levels misclassified in Grafana 1Password Connect uses non-standard numeric log levels (1=error..5=trace) which Grafana can't interpret, causing info-level health checks to appear as errors. Add a stage.match + stage.template in the Alloy log pipeline scoped to the 1password namespace to normalize these to standard strings. See: https://github.com/1Password/connect/issues/44 Co-Authored-By: Claude Opus 4.6 --- argocd/manifests/alloy-k8s/config.alloy | 12 ++++++++++++ .../fix-onepassword-numeric-log-levels.bugfix.md | 1 + 2 files changed, 13 insertions(+) create mode 100644 docs/changelog.d/fix-onepassword-numeric-log-levels.bugfix.md diff --git a/argocd/manifests/alloy-k8s/config.alloy b/argocd/manifests/alloy-k8s/config.alloy index 86c0747..c169c93 100644 --- a/argocd/manifests/alloy-k8s/config.alloy +++ b/argocd/manifests/alloy-k8s/config.alloy @@ -100,6 +100,18 @@ loki.process "pods" { values = ["__error__", "__error_details__"] } + // Normalize 1password-connect numeric log levels to strings (1=error..5=trace) + // Scoped to the 1password namespace so other services are unaffected. + // See: https://github.com/1Password/connect/issues/44 + stage.match { + selector = "{namespace=\"1password\"}" + + stage.template { + source = "level" + template = "{{ if eq .Value \"1\" }}error{{ else if eq .Value \"2\" }}warn{{ else if eq .Value \"3\" }}info{{ else if eq .Value \"4\" }}debug{{ else if eq .Value \"5\" }}trace{{ else }}{{ .Value }}{{ end }}" + } + } + // Extract labels from parsed JSON data stage.labels { values = { diff --git a/docs/changelog.d/fix-onepassword-numeric-log-levels.bugfix.md b/docs/changelog.d/fix-onepassword-numeric-log-levels.bugfix.md new file mode 100644 index 0000000..74f2a99 --- /dev/null +++ b/docs/changelog.d/fix-onepassword-numeric-log-levels.bugfix.md @@ -0,0 +1 @@ +Fix 1Password Connect logs showing as errors in Grafana by normalizing numeric log levels (1-5) to standard strings (error/warn/info/debug/trace) in the Alloy log processing pipeline. -- 2.50.1 (Apple Git-155) From 744255056b68b9f0c20ab4e3538fa5b8b4583e19 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Sat, 7 Mar 2026 13:54:18 -0800 Subject: [PATCH 2/2] Apply same numeric log level fix to alloy-ringtail 1password-connect also runs on ringtail's k3s cluster, so the same stage.match + stage.template normalization is needed there too. Co-Authored-By: Claude Opus 4.6 --- argocd/manifests/alloy-ringtail/config.alloy | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/argocd/manifests/alloy-ringtail/config.alloy b/argocd/manifests/alloy-ringtail/config.alloy index 9ae8981..c63b478 100644 --- a/argocd/manifests/alloy-ringtail/config.alloy +++ b/argocd/manifests/alloy-ringtail/config.alloy @@ -139,6 +139,18 @@ loki.process "pods" { values = ["__error__", "__error_details__"] } + // Normalize 1password-connect numeric log levels to strings (1=error..5=trace) + // Scoped to the 1password namespace so other services are unaffected. + // See: https://github.com/1Password/connect/issues/44 + stage.match { + selector = "{namespace=\"1password\"}" + + stage.template { + source = "level" + template = "{{ if eq .Value \"1\" }}error{{ else if eq .Value \"2\" }}warn{{ else if eq .Value \"3\" }}info{{ else if eq .Value \"4\" }}debug{{ else if eq .Value \"5\" }}trace{{ else }}{{ .Value }}{{ end }}" + } + } + // Extract labels from parsed JSON data stage.labels { values = { -- 2.50.1 (Apple Git-155)