Alloy prometheus modules

From UVOO Tech Wiki
Revision as of 06:58, 2 July 2025 by Busk (talk | contribs) (Created page with "Yes, you are correct! Grafana Alloy integrates the Blackbox Exporter directly as a built-in component. This means you don't need to run a separate Blackbox Exporter instance a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Yes, you are correct! Grafana Alloy integrates the Blackbox Exporter directly as a built-in component. This means you don't need to run a separate Blackbox Exporter instance alongside Alloy; Alloy handles the probing internally. Grafana Alloy is designed to be a highly flexible and extensible "observability pipeline" tool. It achieves this by bundling a wide range of components for various tasks. These components fall into several categories: 1. Prometheus-related Components (prometheus.) This is a core set, as Alloy is heavily inspired by and compatible with Prometheus.

* prometheus.exporter.: These embed various Prometheus exporters.
  * prometheus.exporter.blackbox: As discussed, for probing external endpoints (HTTP, TCP, ICMP, DNS).
  * prometheus.exporter.unix: Embeds the Node Exporter for collecting host-level metrics (CPU, memory, disk, network, etc.) on Unix-like systems.
  * prometheus.exporter.process: Embeds the Process Exporter for collecting metrics about running processes on a system.
  * prometheus.exporter.windows: For Windows-specific host metrics (similar to Node Exporter for Unix).
  * prometheus.exporter.apache: For Apache HTTP Server metrics.
  * prometheus.exporter.mongodb: For MongoDB metrics.
  * prometheus.exporter.mysqld: For MySQL metrics.
  * prometheus.exporter.postgres: For PostgreSQL metrics.
  * prometheus.exporter.redis: For Redis metrics.
  * prometheus.exporter.squid: For Squid proxy server metrics.
  * ... (and more are added over time, reflecting common Prometheus exporters)
* prometheus.scrape: For scraping Prometheus-compatible metrics endpoints.
* prometheus.remote_write: For sending metrics to remote storage systems (like Mimir, Cortex, or Prometheus itself).
* prometheus.relabel: For transforming, filtering, or adding/removing labels from metrics.

2. OpenTelemetry Collector (OTelcol) Components (otelcol.) Grafana Alloy is a distribution of the OpenTelemetry Collector, so it includes many of its components for handling metrics, logs, traces, and profiles in the OpenTelemetry format. This includes:

* otelcol.receiver.: For receiving telemetry data from various sources.
  * otelcol.receiver.otlp: For receiving OpenTelemetry Protocol (OTLP) data.
  * otelcol.receiver.jaeger: For receiving Jaeger traces.
  * otelcol.receiver.zipkin: For receiving Zipkin traces.
  * otelcol.receiver.prometheus: For receiving Prometheus metrics (yes, the OTel Collector can also scrape Prometheus endpoints).
  * otelcol.receiver.kafka: For receiving data from Kafka.
  * ... many more for different protocols and data sources.
* otelcol.processor.*: For processing and transforming telemetry data.
  * otelcol.processor.batch: For batching telemetry data.
  * otelcol.processor.attributes: For adding, removing, or modifying attributes (labels/tags) on telemetry data.
  * otelcol.processor.resource: For adding, removing, or modifying resource attributes.
  * otelcol.processor.tail_sampling: For intelligent trace sampling.
  * ... and many more for filtering, de-duplication, etc.
* otelcol.exporter.*: For exporting telemetry data to various backends.
  * otelcol.exporter.otlp: For exporting OTLP data.
  * otelcol.exporter.prometheusremotewrite: For exporting metrics to Prometheus remote write compatible endpoints.
  * otelcol.exporter.loki: For exporting logs to Loki.
  * otelcol.exporter.file: For exporting to local files.
  * otelcol.exporter.logging: For logging telemetry data (useful for debugging).
  * ... and many more for different storage systems and formats.

3. Loki-related Components (loki.) For collecting and processing logs, often used in conjunction with Grafana Loki.

* loki.source.file: For tailing log files.
* loki.source.kubernetes: For collecting logs from Kubernetes pods.
* loki.process: For processing log lines (e.g., parsing, filtering, adding labels).
* loki.write: For writing logs to a Loki instance.

4. Pyroscope-related Components (pyroscope.) For collecting and sending profiling data to Grafana Pyroscope.

* pyroscope.scrape: For scraping profiling data.
* pyroscope.write: For writing profiles to a Pyroscope instance.

5. Discovery Components (discovery.) These components help discover targets for scraping in dynamic environments like Kubernetes.

* discovery.kubernetes: For discovering targets within a Kubernetes cluster (pods, services, nodes, endpoints).
* discovery.static: For defining static targets.
* discovery.file: For reading targets from files.
* discovery.consul: For discovering targets from Consul.
* discovery.ec2: For discovering targets in AWS EC2.
* ... and many more for various cloud providers and service discovery systems.

6. Mimir-related Components (mimir.) Specifically for managing rules within Grafana Mimir.

* mimir.rules.kubernetes: For managing Mimir recording and alerting rules from Kubernetes ConfigMaps or Secrets.

7. Local and Utility Components (local.*, sys.*, array.*, string.*, etc.) These provide general utility functions:

* local.file: For reading content from local files (e.g., secrets, configuration snippets).
* local.file_match: For matching files based on patterns.
* sys.env: For accessing environment variables.
* array.*, string.*: Functions for manipulating arrays and strings.

Where to find the full, most up-to-date list: The best place to find the comprehensive and most current list of all built-in components and their documentation is the official Grafana Alloy documentation:

* Grafana Alloy Components Reference: https://grafana.com/docs/alloy/latest/reference/components/

This page organizes components by type (metrics, logs, traces, profiles, discovery, utility) and provides detailed information on their arguments, exported fields, and examples. It's an invaluable resource when building your Alloy pipelines!