Fix 1Password Connect numeric log levels misclassified in Grafana #287

Merged
eblume merged 2 commits from fix/onepassword-numeric-log-levels into main 2026-03-07 13:57:05 -08:00
Owner

Summary

  • 1Password Connect uses non-standard numeric log levels (1=error, 2=warn, 3=info, 4=debug, 5=trace) per 1Password/connect#44
  • Alloy extracts the level JSON field as-is, so info-level health checks get level="3" in Loki
  • Grafana expects string level labels — numeric values are unrecognized, causing misclassified log severity/coloring
  • Adds a stage.match + stage.template in the Alloy pipeline scoped to {namespace="1password"} to normalize numeric levels to standard strings
  • Other services are completely unaffected (scoped by namespace, not global)

Deployment and Testing

  • Sync alloy-k8s from branch: argocd app set alloy-k8s --revision fix/onepassword-numeric-log-levels && argocd app sync alloy-k8s
  • Wait ~2 minutes for new logs to flow
  • Verify level labels: curl -sG "http://localhost:3100/loki/api/v1/label/level/values" --data-urlencode 'query={namespace="1password"}' should show "info" and "warn" instead of "3" and "2"
  • Check Grafana log panel for 1password namespace — logs should no longer appear as errors
  • After merge: argocd app set alloy-k8s --revision main && argocd app sync alloy-k8s
## Summary - 1Password Connect uses non-standard numeric log levels (`1`=error, `2`=warn, `3`=info, `4`=debug, `5`=trace) per [1Password/connect#44](https://github.com/1Password/connect/issues/44) - Alloy extracts the `level` JSON field as-is, so info-level health checks get `level="3"` in Loki - Grafana expects string level labels — numeric values are unrecognized, causing misclassified log severity/coloring - Adds a `stage.match` + `stage.template` in the Alloy pipeline scoped to `{namespace="1password"}` to normalize numeric levels to standard strings - Other services are completely unaffected (scoped by namespace, not global) ## Deployment and Testing - [ ] Sync alloy-k8s from branch: `argocd app set alloy-k8s --revision fix/onepassword-numeric-log-levels && argocd app sync alloy-k8s` - [ ] Wait ~2 minutes for new logs to flow - [ ] Verify level labels: `curl -sG "http://localhost:3100/loki/api/v1/label/level/values" --data-urlencode 'query={namespace="1password"}'` should show `"info"` and `"warn"` instead of `"3"` and `"2"` - [ ] Check Grafana log panel for 1password namespace — logs should no longer appear as errors - [ ] After merge: `argocd app set alloy-k8s --revision main && argocd app sync alloy-k8s`
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
eblume merged commit 14e931591b into main 2026-03-07 13:57:05 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
eblume/blumeops!287
No description provided.