<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Network metrics on Grafana Labs</title><link>https://grafana.com/docs/beyla/v3.9.x/network/</link><description>Recent content in Network metrics on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/beyla/v3.9.x/network/index.xml" rel="self" type="application/rss+xml"/><item><title>Beyla network metrics quickstart</title><link>https://grafana.com/docs/beyla/v3.9.x/network/quickstart/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/network/quickstart/</guid><content><![CDATA[&lt;h1 id=&#34;beyla-network-metrics-quickstart&#34;&gt;Beyla network metrics quickstart&lt;/h1&gt;
&lt;p&gt;Beyla can generate network metrics in any environment (physical host, virtual host, or container). It&amp;rsquo;s recommended to use a Kubernetes environment, as Beyla is able to decorate each metric with the metadata of the source and destination Kubernetes entities.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;This tutorial describes how to deploy Beyla in Kubernetes from scratch.
To use Helm, consult the &lt;a href=&#34;../../setup/kubernetes-helm/&#34;&gt;Deploy Beyla in Kubernetes with Helm&lt;/a&gt; documentation.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;deploy-beyla-with-network-metrics&#34;&gt;Deploy Beyla with network metrics&lt;/h2&gt;
&lt;p&gt;To enable network metrics, set the following option in your Beyla configuration:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;network:
  enable: true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Or export the following environment variable&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;sh&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-sh&#34;&gt;export BEYLA_NETWORK_METRICS=true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Network metrics requires metrics to be decorated with Kubernetes metadata. To enable this feature, set the following option in your Beyla configuration:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;attributes:
  kubernetes:
    enable : true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Or export the following environment variable&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;sh&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-sh&#34;&gt;export BEYLA_KUBE_METADATA_ENABLE=true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Finally, network metrics requires elevated privileges. Running with &lt;code&gt;sudo&lt;/code&gt; or &lt;code&gt;privileged: true&lt;/code&gt; for Kubernetes is the simplest approach. For more restrictive environments, Beyla can run with specific Linux capabilities. Refer to &lt;a href=&#34;../../security/&#34;&gt;Security, permissions and capabilities&lt;/a&gt; for details on the required capabilities for your use case.&lt;/p&gt;
&lt;p&gt;To learn more about Beyla configuration, consult the &lt;a href=&#34;../../configure/options/&#34;&gt;Beyla configuration documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;example-configuration&#34;&gt;Example configuration&lt;/h2&gt;
&lt;p&gt;The following YAML configuration provides a simple Beyla deployment for network metrics:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: v1
kind: ServiceAccount
metadata:
  name: beyla
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: beyla
rules:
  - apiGroups: [ &amp;#34;apps&amp;#34; ]
    resources: [ &amp;#34;replicasets&amp;#34; ]
    verbs: [ &amp;#34;list&amp;#34;, &amp;#34;watch&amp;#34; ]
  - apiGroups: [ &amp;#34;&amp;#34; ]
    resources: [ &amp;#34;pods&amp;#34;, &amp;#34;services&amp;#34;, &amp;#34;nodes&amp;#34; ]
    verbs: [ &amp;#34;list&amp;#34;, &amp;#34;watch&amp;#34; ]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: beyla
subjects:
  - kind: ServiceAccount
    name: beyla
    namespace: default
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: beyla
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: beyla-config
data:
  beyla-config.yml: |
    attributes:
      kubernetes:
        enable: true
    network:
      enable: true
      print_flows: true
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: beyla
spec:
  selector:
    matchLabels:
      instrumentation: beyla
  template:
    metadata:
      labels:
        instrumentation: beyla
    spec:
      serviceAccountName: beyla
      hostNetwork: true
      volumes:
        - name: beyla-config
          configMap:
            name: beyla-config
      containers:
        - name: beyla
          image: grafana/beyla:main
          securityContext:
            privileged: true
          volumeMounts:
            - mountPath: /config
              name: beyla-config
          env:
            - name: BEYLA_CONFIG_PATH
              value: &amp;#34;/config/beyla-config.yml&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note the following requirements for this deployment configuration:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The container image uses the latest under-development &lt;code&gt;grafana/beyla:main&lt;/code&gt; image.&lt;/li&gt;
&lt;li&gt;Beyla needs to run as a DaemonSet, as it is requires only one Beyla instance per node&lt;/li&gt;
&lt;li&gt;To listen to network packets on the host, Beyla requires the &lt;code&gt;hostNetwork: true&lt;/code&gt; permission&lt;/li&gt;
&lt;li&gt;To decorate the network metrics with Kubernetes metadata, create a &lt;code&gt;ClusterRole&lt;/code&gt; and &lt;code&gt;ClusterRoleBinding&lt;/code&gt; with &lt;code&gt;list&lt;/code&gt; and &lt;code&gt;watch&lt;/code&gt; permissions for ReplicaSets, Pods, Services and Nodes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The configuration does not set an endpoint to export metrics. Instead, the &lt;code&gt;trace_printer: text&lt;/code&gt; option outputs the captured network flows to standard output.&lt;/p&gt;
&lt;p&gt;Use &lt;code&gt;kubectl logs&lt;/code&gt; to see network flow entries, for example:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;network_flow: beyla.ip=172.18.0.2 iface= direction=255 src.address=10.244.0.4 dst.address=10.96.0.1
src.name=local-path-provisioner-7577fdbbfb-g6b7d dst.name=kubernetes
k8s.src.node.name=kind-control-plane k8s.dst.namespace=default k8s.dst.name=kubernetes
k8s.dst.owner.type=Service k8s.src.namespace=local-path-storage
k8s.src.name=local-path-provisioner-7577fdbbfb-g6b7d k8s.src.type=Pod
k8s.src.owner.name=local-path-provisioner k8s.src.owner.type=Deployment
k8s.dst.type=Service k8s.dst.owner.name=kubernetes&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For further information on the attributes used, consult the &lt;a href=&#34;./&#34;&gt;network metrics documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;export-opentelemetry-metrics&#34;&gt;Export OpenTelemetry metrics&lt;/h2&gt;
&lt;p&gt;After you have confirmed that network metrics are being collected, configure Beyla to export the metrics in OpenTelemetry
format to an OpenTelemetry endpoint.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Prometheus exporting for network metrics is not currently supported.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;Beyla works with any OpenTelemetry endpoint. This quickstart uses the OpenTelemetry endpoint in Grafana Cloud. You can get a &lt;a href=&#34;/pricing/&#34;&gt;Free Grafana Cloud Account at Grafana&amp;rsquo;s website&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To get your stack&amp;rsquo;s OpenTelemetry endpoint, login to the Grafana Cloud Portal, and click &lt;strong&gt;Configure&lt;/strong&gt; under the &lt;strong&gt;OpenTelemetry&lt;/strong&gt; section.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/media/docs/grafana-cloud/beyla/quickstart/otel-cloud-portal-box.png&#34;
  alt=&#34;OpenTelemetry Grafana Cloud portal&#34; width=&#34;1002&#34;
     height=&#34;312&#34;/&gt;&lt;/p&gt;
&lt;p&gt;Under &lt;strong&gt;Password / API token&lt;/strong&gt;, click &lt;strong&gt;Generate now&lt;/strong&gt; and follow the instructions to create an API token.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Environment Variables&lt;/strong&gt; section is populated with a set of standard OpenTelemetry environment variables which provide the connection endpoint and credentials information for Beyla.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/media/docs/grafana-cloud/beyla/quickstart/otlp-connection-headers.png&#34;
  alt=&#34;OTLP connection headers&#34; width=&#34;1592&#34;
     height=&#34;998&#34;/&gt;&lt;/p&gt;
&lt;p&gt;Copy the value of &lt;code&gt;OTEL_EXPORTER_OTLP_HEADERS&lt;/code&gt; environment variable and paste it as a Kubernetes secret (and deploy it):&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: v1
kind: Secret
metadata:
  name: grafana-secret
type: Opaque
stringData:
  otlp-headers: &amp;#34;Authorization=Basic MzQ3NTp.....&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Now add the &lt;code&gt;OTEL_EXPORTER_OTLP_HEADERS&lt;/code&gt; and reference this secret as the variable value.&lt;/p&gt;
&lt;p&gt;Also Add &lt;code&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/code&gt; and its value as an environment variable to the Beyla container in the Kubernetes manifest. The &lt;code&gt;env&lt;/code&gt; section of the &lt;code&gt;beyla&lt;/code&gt; container in the manifest from the start of this document should look like:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;          env:
            - name: BEYLA_CONFIG_PATH
              value: &amp;#34;/config/beyla-config.yml&amp;#34;
            - name: OTEL_EXPORTER_OTLP_ENDPOINT
              value: &amp;#34;https://otlp-gateway-prod-eu-west-0.grafana.net/otlp&amp;#34;
            - name: OTEL_EXPORTER_OTLP_HEADERS
              valueFrom:
                secretKeyRef:
                  key: otlp-headers
                  name: grafana-secret&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;select-metrics-attributes-to-reduce-cardinality&#34;&gt;Select metrics attributes to reduce cardinality&lt;/h2&gt;
&lt;p&gt;Be default, Beyla includes the following &lt;a href=&#34;./&#34;&gt;attributes&lt;/a&gt; in the &lt;code&gt;beyla.network.flow.bytes&lt;/code&gt; metric:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;k8s.src.owner.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.src.namespace&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.dst.owner.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.dst.namespace&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.cluster.name&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Beyla only includes a subset of the available attributes to avoid leading to
a &lt;a href=&#34;/blog/2022/02/15/what-are-cardinality-spikes-and-why-do-they-matter/&#34;&gt;cardinality explosion&lt;/a&gt; in
the metrics storage, especially if some attributes like &lt;code&gt;src.address&lt;/code&gt; or &lt;code&gt;dst.address&lt;/code&gt; capture the IP addresses of the external traffic.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;attributes.select.&amp;lt;metric-name&amp;gt;.include&lt;/code&gt; YAML subsection makes it possible to select the attributes to report:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;network:
  enable: true
attributes:
  kubernetes:
    enable: true
  select:
    beyla.network.flow.bytes:
      include:
      - k8s.src.owner.name
      - k8s.src.namespace
      - k8s.dst.owner.name
      - k8s.dst.namespace&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The previous example would aggregate the &lt;code&gt;beyla.network.flow.bytes&lt;/code&gt; value by source and destination Kubernetes owner
(Deployment, DaemonSet, StatefulSet, ReplicaSet), avoiding finer-grained attributes such as Pod name or IP addresses.&lt;/p&gt;
&lt;h3 id=&#34;group-ip-addresses-by-cidr&#34;&gt;Group IP addresses by CIDR&lt;/h3&gt;
&lt;p&gt;Reporting metric attributes containing IP addresses (&lt;code&gt;src.address&lt;/code&gt; and &lt;code&gt;dst.address&lt;/code&gt;) might lead to cardinality explosion,
however it might be a useful network-level information to get a better view about how networks and sub-networks communicate.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;cidrs&lt;/code&gt; YAML subsection in &lt;code&gt;network&lt;/code&gt; (or the &lt;code&gt;BEYLA_NETWORK_CIDRS&lt;/code&gt; environment variable) accepts a list of
subnets in &lt;a href=&#34;https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;CIDR notation&lt;/a&gt;, in both IPv4 and IPv6 format.&lt;/p&gt;
&lt;p&gt;The existence of the &lt;code&gt;cidrs&lt;/code&gt; section leaves the &lt;code&gt;src.address&lt;/code&gt; and &lt;code&gt;dst.address&lt;/code&gt; fields untouched,
and adds the &lt;code&gt;src.cidr&lt;/code&gt; and &lt;code&gt;dst.cidr&lt;/code&gt; attributes. Don&amp;rsquo;t forget to add them to the &lt;code&gt;attributes.select&lt;/code&gt;
section:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;network:
  enable: true
  cidrs:
    - 10.10.0.0/24
    - 10.0.0.0/8
    - 10.30.0.0/16
attributes:
  kubernetes:
    enable: true
  select:
    beyla_network_flow_bytes:
      include:
          - k8s.src.owner.name
          - k8s.src.namespace
          - k8s.dst.owner.name
          - k8s.dst.namespace
          - src.cidr
          - dst.cidr&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="beyla-network-metrics-quickstart">Beyla network metrics quickstart&lt;/h1>
&lt;p>Beyla can generate network metrics in any environment (physical host, virtual host, or container). It&amp;rsquo;s recommended to use a Kubernetes environment, as Beyla is able to decorate each metric with the metadata of the source and destination Kubernetes entities.&lt;/p></description></item><item><title>Measure traffic between Cloud availability zones</title><link>https://grafana.com/docs/beyla/v3.9.x/network/inter-az/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/network/inter-az/</guid><content><![CDATA[&lt;h1 id=&#34;measure-traffic-between-cloud-availability-zones&#34;&gt;Measure traffic between Cloud availability zones&lt;/h1&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;This feature is currently only available in Kubernetes clusters.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;Traffic between Cloud Availability Zones might incur additional costs. Beyla is able to measure it either by
adding &lt;code&gt;src.zone&lt;/code&gt; and &lt;code&gt;dst.zone&lt;/code&gt; attributes to regular network metrics,
or by providing a separate &lt;code&gt;beyla.network.inter.zone.bytes&lt;/code&gt; (OTEL) / &lt;code&gt;beyla_network_inter_zone_bytes_total&lt;/code&gt; (Prometheus)
metric.&lt;/p&gt;
&lt;h2 id=&#34;add-srczone-and-dstzone-attributes-to-regular-network-metrics&#34;&gt;Add &lt;code&gt;src.zone&lt;/code&gt; and &lt;code&gt;dst.zone&lt;/code&gt; attributes to regular network metrics&lt;/h2&gt;
&lt;p&gt;Source and destination availability zone attributes are disabled by default in Beyla. To enable it, explicitly add them to the list of
included network attributes in the Beyla YAML configuration:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;attributes:
  select:
    beyla_network_flow_bytes:
      include:
        - k8s.src.owner.name
        - k8s.src.namespace
        - k8s.dst.owner.name
        - k8s.dst.namespace
        - k8s.cluster.name
        - src.zone
        - dst.zone&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This configuration makes inter-zone traffic visible for each &lt;code&gt;beyla_network_flow_bytes_total&lt;/code&gt; metric
with different &lt;code&gt;src_zone&lt;/code&gt; and &lt;code&gt;dst_zone&lt;/code&gt; attributes.&lt;/p&gt;
&lt;p&gt;If you require higher granularity in your inter-zone traffic measurement (for example, source/destination pods or nodes),
adding zone attributes would impact the cardinality of the metric, even for traffic within the same availability zone.&lt;/p&gt;
&lt;h2 id=&#34;use-the-beylanetworkinterzone-metric&#34;&gt;Use the &lt;code&gt;beyla.network.inter.zone&lt;/code&gt; metric&lt;/h2&gt;
&lt;p&gt;Using a separate metric for inter-zone traffic reduces the metric cardinality impact of collecting this data,
because the &lt;code&gt;src.zone&lt;/code&gt; and &lt;code&gt;dst.zone&lt;/code&gt; attributes are not added to the regular network metrics.&lt;/p&gt;
&lt;p&gt;To enable the &lt;code&gt;beyla.network.inter.zone&lt;/code&gt; metric, add the &lt;code&gt;network_inter_zone&lt;/code&gt; option to the
&lt;a href=&#34;../../configure/export-data/&#34;&gt;BEYLA_OTEL_METRICS_FEATURES or BEYLA_PROMETHEUS_FEATURES&lt;/a&gt; configuration option,
or its equivalent YAML options. For example, if Beyla is configured to export metrics via OpenTelemetry:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;otel_metrics_export:
  features:
    - network
    - network_inter_zone&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;By default, the &lt;code&gt;beyla.network.inter.zone&lt;/code&gt; metric includes only high-level attributes such as zone information and source/destination owner names to keep metric cardinality low. However, you might want to analyze inter-zone traffic at a more granular level, such as by individual pods or nodes, to identify specific sources of cross-zone communication.&lt;/p&gt;
&lt;p&gt;To include additional attributes for detailed analysis, configure attribute selection specifically for the inter-zone metric:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;attributes:
  select:
    beyla_network_inter_zone_bytes:
      include:
        - k8s.src.namespace
        - k8s.src.pod.name
        - k8s.src.node.name
        - k8s.dst.namespace
        - k8s.dst.pod.name
        - k8s.dst.node.name
        - k8s.cluster.name
        - src.zone
        - dst.zone&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This configuration provides detailed visibility into which specific pods and nodes generate inter-zone traffic, helping you optimize your application topology and reduce cross-zone costs.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Adding more attributes increases the metric cardinality.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;promql-queries-to-measure-inter-zone-traffic&#34;&gt;PromQL queries to measure inter-zone traffic&lt;/h2&gt;
&lt;p&gt;Assuming that both &lt;code&gt;network&lt;/code&gt; and &lt;code&gt;network_inter_zone&lt;/code&gt; metric families are enabled, you can use the following PromQL queries
to measure inter-zone traffic:&lt;/p&gt;
&lt;p&gt;Overall inter-zone traffic throughput:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;sum(rate(beyla_network_inter_zone_bytes_total[$__rate_interval]))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Inter-zone traffic throughput, summarized by source and destination zones:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;sum(rate(beyla_network_inter_zone_bytes_total[$__rate_interval])) by(src_zone,dst_zone)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Overall same-zone traffic throughput:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;sum(rate(beyla_network_flow_bytes_total[$__rate_interval]))
  - sum(rate(beyla_network_inter_zone_bytes_total[$__rate_interval]))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Percentage of inter-zone traffic from the total:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;100 * sum(rate(beyla_network_inter_zone_bytes_total[$__rate_interval]))
  / sum(rate(beyla_network_flow_bytes_total[$__rate_interval]))&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="measure-traffic-between-cloud-availability-zones">Measure traffic between Cloud availability zones&lt;/h1>
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>This feature is currently only available in Kubernetes clusters.&lt;/p>&lt;/blockquote>&lt;/div>
&lt;p>Traffic between Cloud Availability Zones might incur additional costs. Beyla is able to measure it either by
adding &lt;code>src.zone&lt;/code> and &lt;code>dst.zone&lt;/code> attributes to regular network metrics,
or by providing a separate &lt;code>beyla.network.inter.zone.bytes&lt;/code> (OTEL) / &lt;code>beyla_network_inter_zone_bytes_total&lt;/code> (Prometheus)
metric.&lt;/p></description></item><item><title>Set up Beyla network metrics in Kubernetes with Helm for Asserts</title><link>https://grafana.com/docs/beyla/v3.9.x/network/asserts/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/network/asserts/</guid><content><![CDATA[&lt;h1 id=&#34;set-up-beyla-network-metrics-in-kubernetes-with-helm-for-asserts&#34;&gt;Set up Beyla network metrics in Kubernetes with Helm for Asserts&lt;/h1&gt;
&lt;p&gt;&lt;a href=&#34;/docs/grafana-cloud/monitor-applications/asserts/&#34;&gt;Asserts&lt;/a&gt; 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.&lt;/p&gt;
&lt;p&gt;To learn more about Beyla network metrics, consult the &lt;a href=&#34;/docs/beyla/latest/network/&#34;&gt;Network&lt;/a&gt; documentation.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Before you install Beyla network metrics and export telemetry data to Asserts you need:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A free Grafana Cloud account.&lt;/li&gt;
&lt;li&gt;Access rights to a Kubernetes cluster, enough to create components with privileges.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can register for a &lt;a href=&#34;/auth/sign-up/create-user&#34;&gt;free forever Grafana Cloud account&lt;/a&gt; in minutes and start sending telemetry data and monitoring your infrastructure and applications.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id=&#34;configuration-for-kubernetes-monitoring&#34;&gt;Configuration for Kubernetes monitoring&lt;/h2&gt;
&lt;p&gt;If you use Kubernetes monitoring and a Helm chart for scraping metrics, create a &lt;code&gt;values.yml&lt;/code&gt; with the following configuration:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;preset: network

podAnnotations:
  k8s.grafana.com/scrape: true
  k8s.grafana.com/job: beyla-network
  k8s.grafana.com/metrics.portName: metrics&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;configure-for-opentelemetry-collector&#34;&gt;Configure for OpenTelemetry Collector&lt;/h2&gt;
&lt;p&gt;If you use an OpenTelemetry Collector for metrics collection, either Grafana Alloy the upstream collector, create a &lt;code&gt;values.yml&lt;/code&gt; with the following configuration:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;sh&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-sh&#34;&gt;preset: network

env:
  OTEL_EXPORTER_OTLP_ENDPOINT: your-otlp-endpoint:4318&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;install-and-run-beyla-network-metrics-for-asserts&#34;&gt;Install and run Beyla network metrics for Asserts&lt;/h2&gt;
&lt;p&gt;Run the following &lt;code&gt;helm&lt;/code&gt; commands to add the &lt;code&gt;grafana&lt;/code&gt; repository and install and run &lt;code&gt;beyla&lt;/code&gt; with your configuration for network metrics:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;sh&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-sh&#34;&gt;helm repo add grafana https://grafana.github.io/helm-charts
helm install beyla --create-namespace -n beyla -f values.yaml grafana/beyla&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;observe-your-services-in-asserts&#34;&gt;Observe your services in Asserts&lt;/h2&gt;
&lt;p&gt;Finally, navigate to Asserts in &lt;a href=&#34;/auth/sign-in/&#34;&gt;Grafana Cloud&lt;/a&gt; and view your instrumented services.&lt;/p&gt;
]]></content><description>&lt;h1 id="set-up-beyla-network-metrics-in-kubernetes-with-helm-for-asserts">Set up Beyla network metrics in Kubernetes with Helm for Asserts&lt;/h1>
&lt;p>&lt;a href="/docs/grafana-cloud/monitor-applications/asserts/">Asserts&lt;/a> 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.&lt;/p></description></item><item><title>Beyla Network Metrics configuration options</title><link>https://grafana.com/docs/beyla/v3.9.x/network/config/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/network/config/</guid><content><![CDATA[&lt;h1 id=&#34;beyla-network-metrics-configuration-options&#34;&gt;Beyla Network Metrics configuration options&lt;/h1&gt;
&lt;p&gt;Network metrics are configured under the &lt;code&gt;network&lt;/code&gt; property of the &lt;a href=&#34;../../configure/options/&#34;&gt;Beyla Configuration YAML file&lt;/a&gt; or with a set of environment variables prefixed as &lt;code&gt;BEYLA_NETWORK_&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Example YAML:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;network:
  enable: true
  cidrs:
    - 10.10.0.0/24
    - 10.0.0.0/8
    - 10.30.0.0/16
attributes:
  kubernetes:
    enable: true
  select:
    beyla_network_flow_bytes:
      include:
      - k8s.src.owner.name
      - k8s.src.namespace
      - k8s.dst.owner.name
      - k8s.dst.namespace
      - src.cidr
      - dst.cidr
otel_metrics_export:
  endpoint: http://localhost:4318&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In addition to the &lt;code&gt;network&lt;/code&gt; YAML section, Beyla configuration requires an endpoint to export the
network metrics (in the previous example, &lt;code&gt;otel_metrics_export&lt;/code&gt;, but it also accepts a
&lt;a href=&#34;../../configure/options/&#34;&gt;Prometheus endpoint&lt;/a&gt;).&lt;/p&gt;
&lt;h2 id=&#34;network-metrics-configuration-properties&#34;&gt;Network metrics configuration properties&lt;/h2&gt;
&lt;p&gt;To enable network metrics, add one of the following &lt;code&gt;features&lt;/code&gt; to the
first-level &lt;a href=&#34;../../configure/export-data/#metrics-export-features&#34;&gt;metrics section&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;network&lt;/code&gt; enables the &lt;code&gt;beyla_network_flow_bytes&lt;/code&gt; metric: the number of bytes between two endpoints of your cluster&lt;/li&gt;
&lt;li&gt;&lt;code&gt;network_inter_zone&lt;/code&gt; enables &lt;code&gt;beyla_network_inter_zone_bytes&lt;/code&gt; metric: the number of bytes between different
availability zones in your Cloud cluster&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;The &lt;code&gt;beyla_network_inter_zone_bytes&lt;/code&gt; specification is currently in experimental and only available for Kubernetes cluster.
The specification is not final and future version of Beyla may introduce breaking changes.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Environment variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_NETWORK_SOURCE&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;socket_filter&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies the Linux Kernel feature used to source the network events Beyla reports.&lt;/p&gt;
&lt;p&gt;The available options are: &lt;code&gt;tc&lt;/code&gt; and &lt;code&gt;socket_filter&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When &lt;code&gt;tc&lt;/code&gt; 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
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 &lt;code&gt;socket_filter&lt;/code&gt; mode.&lt;/p&gt;
&lt;p&gt;When &lt;code&gt;socket_filter&lt;/code&gt; is used as an event source, Beyla installs an eBPF Linux socket filter to
capture the network events. This mode doesn&amp;rsquo;t conflict with Cilium CNI or other eBPF programs, which
use the Linux Traffic Control egress and ingress filters.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Environment variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cidrs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_NETWORK_CIDRS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;[]string&lt;/td&gt;
              &lt;td&gt;(empty)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;CIDRs list, to be set as the &lt;code&gt;src.cidr&lt;/code&gt; and &lt;code&gt;dst.cidr&lt;/code&gt; attribute with the entry that matches the &lt;code&gt;src.address&lt;/code&gt; and &lt;code&gt;dst.address&lt;/code&gt; respectively.&lt;/p&gt;
&lt;p&gt;The attribute as a function of the source and destination IP addresses.
If an IP address does not match any address here, the attributes won&amp;rsquo;t be set.
If an IP address matches multiple CIDR definitions, the flow is decorated with the narrowest CIDR.
As a result, you can safely add a &lt;code&gt;0.0.0.0/0&lt;/code&gt; entry to group all the traffic that does not match any of the other CIDRs.&lt;/p&gt;
&lt;p&gt;If you set this property via environment variable each entry must be separated by a comma, for example:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;sh&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-sh&#34;&gt;BEYLA_NETWORK_CIDRS=10.0.0.0/8,192.168.0.0/16&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Environment variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;agent_ip&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_NETWORK_AGENT_IP&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(not set)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Allows overriding the reported &lt;code&gt;beyla.ip&lt;/code&gt; attribute on each metric.
If not set, Beyla automatically detects its own IP address from the specified network interface (see next property).&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Environment variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;agent_ip_iface&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_NETWORK_AGENT_IP_IFACE&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;external&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies which interface Beyla should use to pick its own IP address to set the value of the &lt;code&gt;beyla.ip&lt;/code&gt; attribute.
Accepted values are: &lt;code&gt;external&lt;/code&gt; (default), &lt;code&gt;local&lt;/code&gt;, or &lt;code&gt;name:&amp;lt;interface name&amp;gt;&lt;/code&gt; (e.g. &lt;code&gt;name:eth0&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;If the &lt;code&gt;agent_ip&lt;/code&gt; configuration property is set, this property has no effect.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Environment variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;agent_ip_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_NETWORK_AGENT_IP_TYPE&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;any&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies which type of IP address (IPv4 or IPv6 or both) Beyla should report in the &lt;code&gt;beyla.ip&lt;/code&gt; field of each flow.
Accepted values are: &lt;code&gt;any&lt;/code&gt; (default), &lt;code&gt;ipv4&lt;/code&gt;, &lt;code&gt;ipv6&lt;/code&gt;.
If the &lt;code&gt;agent_ip&lt;/code&gt; configuration property is set, this property has no effect.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Environment variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;interfaces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_NETWORK_INTERFACES&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;[]string&lt;/td&gt;
              &lt;td&gt;(empty)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The interface names where flows are collected from.
If empty, Beyla fetches all the interfaces in the system, excepting the ones listed in &lt;code&gt;excluded_interfaces&lt;/code&gt; (see below).
If an entry is enclosed by slashes (e.g. &lt;code&gt;/br-/&lt;/code&gt;), it is matched as regular expression, otherwise it is matched as a case-sensitive string.&lt;/p&gt;
&lt;p&gt;If you set this property via environment variable each entry must be separated by a comma, for example:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;sh&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-sh&#34;&gt;BEYLA_NETWORK_INTERFACES=eth0,eth1,/^veth/&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Environment variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude_interfaces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_NETWORK_EXCLUDE_INTERFACES&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;[]string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;lo&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The interface names to be excluded from network flow tracing.
Default: &lt;code&gt;lo&lt;/code&gt; (loop-back).
If an entry is enclosed by slashes (e.g. &lt;code&gt;/br-/&lt;/code&gt;), it is matched as a regular expression, otherwise it is matched as a case-sensitive string.&lt;/p&gt;
&lt;p&gt;If you set this property via environment variable each entry must be separated by a comma, for example:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;sh&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-sh&#34;&gt;BEYLA_NETWORK_EXCLUDE_INTERFACES=lo,/^veth/&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Environment variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;protocols&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_NETWORK_PROTOCOLS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;[]string&lt;/td&gt;
              &lt;td&gt;(empty)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If set, Beyla drops any network flow whose reported Internet Protocol is not in this list.&lt;/p&gt;
&lt;p&gt;The accepted values are defined in the Linux enumeration of
&lt;a href=&#34;https://elixir.bootlin.com/linux/v6.8.7/source/include/uapi/linux/in.h#L28&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Standard well-defined IP protocols&lt;/a&gt;,
and can be:
&lt;code&gt;TCP&lt;/code&gt;, &lt;code&gt;UDP&lt;/code&gt;, &lt;code&gt;IP&lt;/code&gt;, &lt;code&gt;ICMP&lt;/code&gt;, &lt;code&gt;IGMP&lt;/code&gt;, &lt;code&gt;IPIP&lt;/code&gt;, &lt;code&gt;EGP&lt;/code&gt;, &lt;code&gt;PUP&lt;/code&gt;, &lt;code&gt;IDP&lt;/code&gt;, &lt;code&gt;TP&lt;/code&gt;, &lt;code&gt;DCCP&lt;/code&gt;, &lt;code&gt;IPV6&lt;/code&gt;, &lt;code&gt;RSVP&lt;/code&gt;, &lt;code&gt;GRE&lt;/code&gt;, &lt;code&gt;ESP&lt;/code&gt;, &lt;code&gt;AH&lt;/code&gt;,
&lt;code&gt;MTP&lt;/code&gt;, &lt;code&gt;BEETPH&lt;/code&gt;, &lt;code&gt;ENCAP&lt;/code&gt;, &lt;code&gt;PIM&lt;/code&gt;, &lt;code&gt;COMP&lt;/code&gt;, &lt;code&gt;L2TP&lt;/code&gt;, &lt;code&gt;SCTP&lt;/code&gt;, &lt;code&gt;UDPLITE&lt;/code&gt;, &lt;code&gt;MPLS&lt;/code&gt;, &lt;code&gt;ETHERNET&lt;/code&gt;, &lt;code&gt;RAW&lt;/code&gt;&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Environment variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude_protocols&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_NETWORK_EXCLUDE_PROTOCOLS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;[]string&lt;/td&gt;
              &lt;td&gt;(empty)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If set, Beyla drops any network flow whose reported Internet Protocol is in this list.&lt;/p&gt;
&lt;p&gt;If the &lt;code&gt;protocols&lt;/code&gt;/&lt;code&gt;BEYLA_NETWORK_PROTOCOLS&lt;/code&gt; list is already set, this property is ignored.&lt;/p&gt;
&lt;p&gt;The accepted values are defined in the Linux enumeration of
&lt;a href=&#34;https://elixir.bootlin.com/linux/v6.8.7/source/include/uapi/linux/in.h#L28&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Standard well-defined IP protocols&lt;/a&gt;,
and can be:
&lt;code&gt;TCP&lt;/code&gt;, &lt;code&gt;UDP&lt;/code&gt;, &lt;code&gt;IP&lt;/code&gt;, &lt;code&gt;ICMP&lt;/code&gt;, &lt;code&gt;IGMP&lt;/code&gt;, &lt;code&gt;IPIP&lt;/code&gt;, &lt;code&gt;EGP&lt;/code&gt;, &lt;code&gt;PUP&lt;/code&gt;, &lt;code&gt;IDP&lt;/code&gt;, &lt;code&gt;TP&lt;/code&gt;, &lt;code&gt;DCCP&lt;/code&gt;, &lt;code&gt;IPV6&lt;/code&gt;, &lt;code&gt;RSVP&lt;/code&gt;, &lt;code&gt;GRE&lt;/code&gt;, &lt;code&gt;ESP&lt;/code&gt;, &lt;code&gt;AH&lt;/code&gt;,
&lt;code&gt;MTP&lt;/code&gt;, &lt;code&gt;BEETPH&lt;/code&gt;, &lt;code&gt;ENCAP&lt;/code&gt;, &lt;code&gt;PIM&lt;/code&gt;, &lt;code&gt;COMP&lt;/code&gt;, &lt;code&gt;L2TP&lt;/code&gt;, &lt;code&gt;SCTP&lt;/code&gt;, &lt;code&gt;UDPLITE&lt;/code&gt;, &lt;code&gt;MPLS&lt;/code&gt;, &lt;code&gt;ETHERNET&lt;/code&gt;, &lt;code&gt;RAW&lt;/code&gt;&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Environment variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cache_max_flows&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_NETWORK_CACHE_MAX_FLOWS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;integer&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;5000&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies how many flows can be accumulated in the accounting cache before being flushed for its later export.
Default value is 5000.
Decrease it if you see the &amp;ldquo;received message larger than max&amp;rdquo; error in Beyla logs.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Environment variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cache_active_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_NETWORK_CACHE_ACTIVE_TIMEOUT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;duration&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;5s&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies the maximum duration that flows are kept in the accounting cache before being flushed for its later export.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Environment variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;direction&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_NETWORK_DIRECTION&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;both&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Allows selecting which flows to trace according to its direction in the interface where they are captured from.
Accepted values are &lt;code&gt;ingress&lt;/code&gt;, &lt;code&gt;egress&lt;/code&gt;, or &lt;code&gt;both&lt;/code&gt; (default).&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;In this context, &lt;em&gt;ingress&lt;/em&gt; or &lt;em&gt;egress&lt;/em&gt; are not related to incoming/outgoing traffic from outside the node or the cluster, but the network interface.
This means that the same network packet could be seen as &amp;ldquo;ingress&amp;rdquo; in a virtual network device and as &amp;ldquo;egress&amp;rdquo; in the backing physical network interface.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Environment variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sampling&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_NETWORK_SAMPLING&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;integer&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt; (disabled)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The rate at which packets should be sampled and sent to the target collector.
For example, if set to 100, one out of 100 packets, on average, are sent to the target collector.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Environment variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;print_flows&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_NETWORK_PRINT_FLOWS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If set to &lt;code&gt;true&lt;/code&gt;, Beyla prints each network flow to standard output.
Note, this might generate a lot of output.&lt;/p&gt;
]]></content><description>&lt;h1 id="beyla-network-metrics-configuration-options">Beyla Network Metrics configuration options&lt;/h1>
&lt;p>Network metrics are configured under the &lt;code>network&lt;/code> property of the &lt;a href="../../configure/options/">Beyla Configuration YAML file&lt;/a> or with a set of environment variables prefixed as &lt;code>BEYLA_NETWORK_&lt;/code>.&lt;/p></description></item></channel></rss>