From 87fa7dc27fe0eeb78b04285dae914c62eaa23161 Mon Sep 17 00:00:00 2001 From: Sean Packham Date: Thu, 11 Jul 2024 13:00:57 +0100 Subject: [PATCH 1/6] Set up Asserts network --- docs/sources/network/asserts.md | 53 +++++++++++++++++++++++++++++++++ docs/sources/network/config.md | 4 +-- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 docs/sources/network/asserts.md diff --git a/docs/sources/network/asserts.md b/docs/sources/network/asserts.md new file mode 100644 index 000000000..a99bcc0a4 --- /dev/null +++ b/docs/sources/network/asserts.md @@ -0,0 +1,53 @@ +--- +title: Set up Beyla network metrics in Kubernetes with Helm for Asserts +menuTitle: Set up Asserts network +description: A guide to install Beyla network metrics in Kubernetes with Helm for Asserts. +weight: 1 +keywords: + - Beyla + - eBPF + - Network +--- + +# Set up Beyla network metrics in Kubernetes with Helm for Asserts + +[Asserts](/docs/grafana-cloud/monitor-applications/asserts/) works with Beyla and requires Beyla network metrics. Learn how to set up Beyla network metrics in Kubernetes with Helm to export telemetry data to Asserts. + +To learn more about Beyla network metrics, consult the [Network](/docs/beyla/latest/network/) documentation. + +## Prerequisites + +Before you install Beyla network metrics and export telemetry data to Asserts you need: + +1. A free Grafana Cloud account. +1. An application to auto-instrument with Beyla. +1. A Linux environment that supports eBPF kernel modules. +1. Administrative `sudo` privileges or `CAP_SYS_ADMIN` permissions. + +You can register for a [free forever Grafana Cloud account](https://grafana.com/auth/sign-up/create-user?) in minutes and start sending telemetry data and monitoring your infrastructure and applications. + +## Install Beyla with Helm + +Create a Helm `values.yml` for Beyla with the following content: + +```yaml +preset: network + +# If using kubernetes-monitoring helm chart and scraping metrics +podAnnotations: + k8s.grafana.com/scrape: true + k8s.grafana.com/job: beyla-network + k8s.grafana.com/metrics.portName: metrics + +# else if using an otel-collector for metrics collection +env: + OTEL_EXPORTER_OTLP_ENDPOINT: your-otlp-endpoint:4318 +``` +Run the following `helm` commands to add the `grafana` repo and install `beyla`: + +```sh +helm repo add grafana https://grafana.github.io/helm-charts +helm install beyla --create-namespace -n beyla -f values.yaml grafana/beyla +``` + +/todo, what do people have to do next? diff --git a/docs/sources/network/config.md b/docs/sources/network/config.md index 254b923d5..dd3b7db49 100644 --- a/docs/sources/network/config.md +++ b/docs/sources/network/config.md @@ -2,7 +2,7 @@ title: Beyla Network Metrics configuration options menuTitle: Configuration description: Learn about the configuration options available for Beyla network metrics -weight: 2 +weight: 3 keywords: - Beyla - eBPF @@ -64,7 +64,7 @@ The available options are: `tc` and `socket_filter`. When `tc` is used as an event source, Beyla uses the Linux Traffic Control ingress and egress filters to capture the network events, in a direct action mode. This event source mode assumes -that no other eBPF programs are attaching to the same Linux Traffic Control interface, in +that no other eBPF programs are attaching to the same Linux Traffic Control interface, in direct action mode. For example, the Cilium Kubernetes CNI uses the same approach, therefore if you have Cilium CNI installed in your Kubernetes cluster, configure Beyla to capture the network events with the `socket_filter` mode. From 6593d8ce7ceef07f68045957b7863492a86bfbf4 Mon Sep 17 00:00:00 2001 From: Sean Packham Date: Thu, 11 Jul 2024 13:08:51 +0100 Subject: [PATCH 2/6] Fix Vales --- docs/sources/network/asserts.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/sources/network/asserts.md b/docs/sources/network/asserts.md index a99bcc0a4..b06dbcf0d 100644 --- a/docs/sources/network/asserts.md +++ b/docs/sources/network/asserts.md @@ -43,7 +43,8 @@ podAnnotations: env: OTEL_EXPORTER_OTLP_ENDPOINT: your-otlp-endpoint:4318 ``` -Run the following `helm` commands to add the `grafana` repo and install `beyla`: + +Run the following `helm` commands to add the `grafana` repository and install `beyla`: ```sh helm repo add grafana https://grafana.github.io/helm-charts From 9e6dc16cab66af51d5c3704d6ecc2b57fe171d17 Mon Sep 17 00:00:00 2001 From: Sean Packham Date: Thu, 11 Jul 2024 13:10:52 +0100 Subject: [PATCH 3/6] Fix link --- docs/sources/network/asserts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/network/asserts.md b/docs/sources/network/asserts.md index b06dbcf0d..cac53df7a 100644 --- a/docs/sources/network/asserts.md +++ b/docs/sources/network/asserts.md @@ -24,7 +24,7 @@ Before you install Beyla network metrics and export telemetry data to Asserts yo 1. A Linux environment that supports eBPF kernel modules. 1. Administrative `sudo` privileges or `CAP_SYS_ADMIN` permissions. -You can register for a [free forever Grafana Cloud account](https://grafana.com/auth/sign-up/create-user?) in minutes and start sending telemetry data and monitoring your infrastructure and applications. +You can register for a [free forever Grafana Cloud account](/auth/sign-up/create-user) in minutes and start sending telemetry data and monitoring your infrastructure and applications. ## Install Beyla with Helm From c8b93b290f681975af918ac72fa4ab19a22ce102 Mon Sep 17 00:00:00 2001 From: Sean Packham Date: Fri, 12 Jul 2024 07:42:05 +0100 Subject: [PATCH 4/6] Edits --- docs/sources/network/asserts.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/docs/sources/network/asserts.md b/docs/sources/network/asserts.md index cac53df7a..8d237760d 100644 --- a/docs/sources/network/asserts.md +++ b/docs/sources/network/asserts.md @@ -26,29 +26,41 @@ Before you install Beyla network metrics and export telemetry data to Asserts yo You can register for a [free forever Grafana Cloud account](/auth/sign-up/create-user) in minutes and start sending telemetry data and monitoring your infrastructure and applications. -## Install Beyla with Helm +There are two configuration options to collect metrics to send to Grafana Cloud for Asserts. First, through Kubernetes monitoring or alternatively with an OpenTelemetry Collector. -Create a Helm `values.yml` for Beyla with the following content: +## Configuration for Kubernetes monitoring + +If you use Kubernetes monitoring and a Helm chart for scraping metrics, create a `values.yml` with the following configuration: ```yaml preset: network -# If using kubernetes-monitoring helm chart and scraping metrics podAnnotations: k8s.grafana.com/scrape: true k8s.grafana.com/job: beyla-network k8s.grafana.com/metrics.portName: metrics +``` + +## Configure for OpenTelemetry Collector + +If you use an OpenTelemetry Collector for metrics collection, either Grafana Alloy the upstream collector, create a `values.yml` with the following configuration: + +```sh +preset: network -# else if using an otel-collector for metrics collection env: OTEL_EXPORTER_OTLP_ENDPOINT: your-otlp-endpoint:4318 ``` -Run the following `helm` commands to add the `grafana` repository and install `beyla`: +## Install and run Beyla network metrics for Asserts + +Run the following `helm` commands to add the `grafana` repository and install and run `beyla` with your configuration for network metrics: ```sh helm repo add grafana https://grafana.github.io/helm-charts helm install beyla --create-namespace -n beyla -f values.yaml grafana/beyla ``` -/todo, what do people have to do next? +## Observe your services in Asserts + +Finally, navigate to Asserts in [Grafana Cloud](/auth/sign-in/) and view your instrumented services. From c320e35377d07ece14fb5b2cffafa99a2e523ba2 Mon Sep 17 00:00:00 2001 From: Sean Packham Date: Fri, 12 Jul 2024 09:51:29 +0100 Subject: [PATCH 5/6] Update docs/sources/network/asserts.md Co-authored-by: Mario Macias --- docs/sources/network/asserts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/network/asserts.md b/docs/sources/network/asserts.md index 8d237760d..e16c4de34 100644 --- a/docs/sources/network/asserts.md +++ b/docs/sources/network/asserts.md @@ -22,7 +22,7 @@ Before you install Beyla network metrics and export telemetry data to Asserts yo 1. A free Grafana Cloud account. 1. An application to auto-instrument with Beyla. 1. A Linux environment that supports eBPF kernel modules. -1. Administrative `sudo` privileges or `CAP_SYS_ADMIN` permissions. +1. Access rights to a Kubernetes cluster, enough to create components with privileges. You can register for a [free forever Grafana Cloud account](/auth/sign-up/create-user) in minutes and start sending telemetry data and monitoring your infrastructure and applications. From c4966ca941ada6c766a33e14d362f3fbce128204 Mon Sep 17 00:00:00 2001 From: Sean Packham Date: Mon, 15 Jul 2024 13:30:49 +0100 Subject: [PATCH 6/6] Edits --- docs/sources/network/asserts.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/sources/network/asserts.md b/docs/sources/network/asserts.md index e16c4de34..67a6d68ab 100644 --- a/docs/sources/network/asserts.md +++ b/docs/sources/network/asserts.md @@ -20,8 +20,6 @@ To learn more about Beyla network metrics, consult the [Network](/docs/beyla/lat Before you install Beyla network metrics and export telemetry data to Asserts you need: 1. A free Grafana Cloud account. -1. An application to auto-instrument with Beyla. -1. A Linux environment that supports eBPF kernel modules. 1. Access rights to a Kubernetes cluster, enough to create components with privileges. You can register for a [free forever Grafana Cloud account](/auth/sign-up/create-user) in minutes and start sending telemetry data and monitoring your infrastructure and applications.