Add Grafana Alloy for centralized observability (metrics, logs, traces) #4816
+522
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds optional Grafana Alloy support to enable centralized observability for validators by collecting and forwarding metrics, logs, and traces to a remote monitoring infrastructure.
Changes
Docker Compose
Optional Alloy monitoring via
docker-compose.alloy.yml
override filedocker-compose -f docker-compose.yml -f docker-compose.alloy.yml up -d
Alloy configuration (
docker/alloy-config.river
)Kubernetes Helm Chart
Alloy dependency in
Chart.yaml
(version 1.3.1)Alloy config template (
alloy-config.river.tpl
)Configuration in
values-local.yaml.gotmpl
LINERA_HELMFILE_SET_ALLOY_ENABLED
env var (default: false)Updated README with monitoring reference
Configuration
Docker Compose
Basic (local metrics only):
With remote endpoints:
Kubernetes
Key Features
Architecture
Docker Compose: Alloy container scrapes metrics from services, collects container logs via Docker socket
Kubernetes: Alloy DaemonSet (one pod per node) discovers and collects from validator pods using Kubernetes API
Verification
Docker Compose
Kubernetes
Files Changed
docker/docker-compose.alloy.yml
- Optional Alloy overridedocker/alloy-config.river
- Alloy configuration for Dockerkubernetes/linera-validator/Chart.yaml
- Alloy dependencykubernetes/linera-validator/Chart.lock
- Updated lock filekubernetes/linera-validator/charts/alloy-1.3.1.tgz
- Alloy Helm chartkubernetes/linera-validator/alloy-config.river.tpl
- Alloy config templatekubernetes/linera-validator/values-local.yaml.gotmpl
- Alloy configurationkubernetes/linera-validator/README.md
- Added monitoring referenceBenefits
Future Work
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]