.alloy extension.alloy convert command).127.0.0.1:12345 by default. It exposes a debugging UI (visual component graph + live debugging), /metrics for Prometheus scraping, and /-/ready / /-/healthy health endpoints.-storage.path; without it, buffered data is lost on restart.remote.vault), Kubernetes Secrets (remote.kubernetes.secret), AWS S3 (remote.s3), and local files (local.file).Components are the core building block of Alloy. Each component performs a single task (collect, transform, forward) and has two parts:
Component naming follows the pattern NAMESPACE.TYPE (e.g., prometheus.scrape, loki.write). You identify a specific instance by combining name + label: prometheus.scrape.my_scraper.
// Component syntax:
COMPONENT_NAME "LABEL" {
attribute = "value"
}
// Example: scrape and forward metrics
prometheus.scrape "app" {
targets = [{"__address__" = "localhost:8080"}]
forward_to = [prometheus.remote_write.prod.receiver]
}
prometheus.remote_write "prod" {
endpoint {
url = "https://prometheus.example.com/api/v1/write"
}
}

Component categories (by namespace prefix):
| Prefix | Purpose |
|---|---|
discovery.* |
Service discovery (Kubernetes, EC2, Consul, DNS, etc.) |
prometheus.* |
Metrics scraping, relabeling, remote write, exporters |
loki.* |
Log collection, processing, and writing to Loki |
otelcol.* |
OpenTelemetry receivers, processors, exporters |
pyroscope.* |
Continuous profiling collection and forwarding |
remote.* |
Pull config/secrets from remote sources |
local.* |
Read local files |
discovery.* |
Target discovery across cloud providers and orchestrators |