diff --git a/.github/depcheck.yml b/.github/depcheck.yml index cc72fb1f6f..b3eeb7c994 100644 --- a/.github/depcheck.yml +++ b/.github/depcheck.yml @@ -23,7 +23,7 @@ github_repos: - github.com/google/dnsmasq_exporter v0.2.0 - github.com/ncabatoff/process-exporter v0.7.5 - github.com/prometheus/mysqld_exporter v0.13.0 - - github.com/prometheus-community/postgres_exporter v0.10.0 + - github.com/prometheus-community/postgres_exporter v0.15.0 - github.com/prometheus-community/windows_exporter v0.16.0 - github.com/percona/mongodb_exporter v0.20.7 - project: github.com/prometheus/prometheus diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index b0351a97b3..983081c202 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -26,7 +26,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@062f2592684a31eb3aa050cc61e7ca1451cecd3d + uses: aquasecurity/trivy-action@d710430a6722f083d3b36b8339ff66b32f22ee55 with: image-ref: 'grafana/alloy:main' format: 'template' diff --git a/CODEOWNERS b/CODEOWNERS index 1b2ed5f90e..f29b1baae7 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -18,4 +18,5 @@ /docs/sources/ @clayton-cornell # Components: -/component/pyroscope/ @grafana/grafana-agent-profiling-maintainers +/internal/component/pyroscope/ @grafana/grafana-agent-profiling-maintainers +/internal/component/beyla/ @marctc \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 68a14a1f3c..ae53122391 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,7 @@ LABEL org.opencontainers.image.source="https://github.com/grafana/alloy" # Install dependencies needed at runtime. RUN <}}. * Follow the [Tutorials][] for hands-on learning about {{< param "PRODUCT_NAME" >}}. * Consult the [Tasks][] instructions to accomplish common objectives with {{< param "PRODUCT_NAME" >}}. -* Check out the [Reference][] documentation to find information about the Alloy components, configuration blocks, and command line tools. +* Check out the [Reference][] documentation to find information about the {{< param "PRODUCT_NAME" >}} components, configuration blocks, and command line tools. [OpenTelemetry]: https://opentelemetry.io/ecosystem/distributions/ [Install]: ../get-started/install/ diff --git a/docs/sources/reference/cli/convert.md b/docs/sources/reference/cli/convert.md index 3a9c791c0b..bb2cc74ea6 100644 --- a/docs/sources/reference/cli/convert.md +++ b/docs/sources/reference/cli/convert.md @@ -40,7 +40,7 @@ The following flags are supported: * `--output`, `-o`: The filepath and filename where the output is written. * `--report`, `-r`: The filepath and filename where the report is written. -* `--source-format`, `-f`: Required. The format of the source file. Supported formats: [prometheus][], [promtail][], [static][]. +* `--source-format`, `-f`: Required. The format of the source file. Supported formats: [otelcol], [prometheus], [promtail], [static]. * `--bypass-errors`, `-b`: Enable bypassing errors when converting. * `--extra-args`, `e`: Extra arguments from the original format used by the converter. @@ -56,6 +56,17 @@ The following flags are supported: Errors are defined as non-critical issues identified during the conversion where an output can still be generated. These can be bypassed using the `--bypass-errors` flag. +### OpenTelemetry Collector + +You can use the `--source-format=otelcol` to convert the source configuration from an [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/configuration/) to a {{< param "PRODUCT_NAME" >}} configuration. + +Many OpenTelemetry Collector components are supported. +Review the `otelcol.*` component information in the [Component Reference][] for more information about `otelcol` components that you can convert. +If a source configuration has unsupported features, you will receive [errors] when you convert it to an {{< param "PRODUCT_NAME" >}} configuration. +The converter raises warnings for configuration options that may require your attention. + +Refer to [Migrate from OpenTelemetry Collector to {{< param "PRODUCT_NAME" >}}][migrate otelcol] for a detailed migration guide. + ### Prometheus Using the `--source-format=prometheus` will convert the source configuration from [Prometheus v2.45][] to an {{< param "PRODUCT_NAME" >}} configuration. @@ -90,6 +101,7 @@ The converter also raises warnings for configuration options that may require yo Refer to [Migrate from Grafana Agent Static to {{< param "PRODUCT_NAME" >}}][migrate static] for a detailed migration guide. +[otelcol]: #opentelemetry-collector [prometheus]: #prometheus [promtail]: #promtail [static]: #static @@ -98,6 +110,7 @@ Refer to [Migrate from Grafana Agent Static to {{< param "PRODUCT_NAME" >}}][mig [relabel_config]: https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#relabel_config [metric_relabel_configs]: https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#metric_relabel_configs [remote_write]: https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#remote_write +[migrate otelcol]: ../../../tasks/migrate/from-otelcol/ [migrate prometheus]: ../../../tasks/migrate/from-prometheus/ [Promtail v2.8.x]: https://grafana.com/docs/loki/v2.8.x/clients/promtail/ [Prometheus v2.45]: https://prometheus.io/docs/prometheus/2.45/configuration/configuration/ diff --git a/docs/sources/reference/cli/run.md b/docs/sources/reference/cli/run.md index ed89d40cfc..0fc7cf1dcf 100644 --- a/docs/sources/reference/cli/run.md +++ b/docs/sources/reference/cli/run.md @@ -51,7 +51,7 @@ The following flags are supported: * `--cluster.advertise-interfaces`: List of interfaces used to infer an address to advertise. Set to `all` to use all available network interfaces on the system. (default `"eth0,en0"`). * `--cluster.max-join-peers`: Number of peers to join from the discovered set (default `5`). * `--cluster.name`: Name to prevent nodes without this identifier from joining the cluster (default `""`). -* `--config.format`: The format of the source file. Supported formats: `alloy`, `prometheus`, `promtail`, `static` (default `"alloy"`). +* `--config.format`: The format of the source file. Supported formats: `alloy`, `otelcol`, `prometheus`, `promtail`, `static` (default `"alloy"`). * `--config.bypass-conversion-errors`: Enable bypassing errors when converting (default `false`). * `--config.extra-args`: Extra arguments from the original format used by the converter. * `--stability.level`: The minimum permitted stability level of functionality to run. Supported values: `experimental`, `public-preview`, `generally-available` (default `"generally-available"`). diff --git a/docs/sources/reference/compatibility/_index.md b/docs/sources/reference/compatibility/_index.md index 358f4eb936..cd0abee020 100644 --- a/docs/sources/reference/compatibility/_index.md +++ b/docs/sources/reference/compatibility/_index.md @@ -39,6 +39,10 @@ The following components, grouped by namespace, _export_ Targets. +{{< collapse title="beyla" >}} +- [beyla.ebpf](../components/beyla.ebpf) +{{< /collapse >}} + {{< collapse title="discovery" >}} - [discovery.azure](../components/discovery.azure) - [discovery.consul](../components/discovery.consul) @@ -309,6 +313,10 @@ The following components, grouped by namespace, _consume_ OpenTelemetry `otelcol +{{< collapse title="beyla" >}} +- [beyla.ebpf](../components/beyla.ebpf) +{{< /collapse >}} + {{< collapse title="faro" >}} - [faro.receiver](../components/faro.receiver) {{< /collapse >}} diff --git a/docs/sources/reference/components/beyla.ebpf.md b/docs/sources/reference/components/beyla.ebpf.md new file mode 100644 index 0000000000..1ed7c87e19 --- /dev/null +++ b/docs/sources/reference/components/beyla.ebpf.md @@ -0,0 +1,276 @@ +--- +canonical: https://grafana.com/docs/alloy/latest/reference/components/beyla.ebpf/ +description: Learn about beyla.ebpf +title: beyla.ebpf +--- + +Public preview + +# beyla.ebpf + +{{< docs/shared lookup="stability/public_preview.md" source="alloy" version="" >}} + +The `beyla.ebpf` component is used as a wrapper for [Grafana Beyla][] which uses [eBPF][] to automatically inspect application executables and the OS networking layer, and capture trace spans related to web transactions and Rate Errors Duration (RED) metrics for Linux HTTP/S and gRPC services. +You can configure the component to collect telemetry data from a specific port or executable path, and other criteria from Kubernetes metadata. +The component exposes metrics that can be collected by a Prometheus scrape component, and traces that can be forwarded to an OTEL exporter component. + +{{< admonition type="note" >}} +To run this component, {{< param "PRODUCT_NAME" >}} requires administrative (`sudo`) privileges, or at least it needs to be granted the `CAP_SYS_ADMIN` and `CAP_SYS_PTRACE` capability. In Kubernetes environments, app armour must be disabled for the Deployment or DaemonSet running {{< param "PRODUCT_NAME" >}}. +{{< /admonition >}} + +[Grafana Beyla]: https://github.com/grafana/beyla +[eBPF]: https://ebpf.io/ + +## Usage + +```alloy +beyla.ebpf "