<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Get started with Grafana Agent Flow on Grafana Labs</title><link>https://grafana.com/docs/agent/v0.43/flow/get-started/</link><description>Recent content in Get started with Grafana Agent Flow on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/agent/v0.43/flow/get-started/index.xml" rel="self" type="application/rss+xml"/><item><title>Install Grafana Agent Flow</title><link>https://grafana.com/docs/agent/v0.43/flow/get-started/install/</link><pubDate>Wed, 11 Sep 2024 17:43:35 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.43/flow/get-started/install/</guid><content><![CDATA[&lt;h1 id=&#34;install-grafana-agent-flow&#34;&gt;Install Grafana Agent Flow&lt;/h1&gt;
&lt;p&gt;You can install Grafana Agent Flow on Docker, Kubernetes, Linux, macOS, or Windows.&lt;/p&gt;
&lt;p&gt;The following architectures are supported:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Linux: AMD64, ARM64&lt;/li&gt;
&lt;li&gt;Windows: AMD64&lt;/li&gt;
&lt;li&gt;macOS: AMD64 (Intel), ARM64 (Apple Silicon)&lt;/li&gt;
&lt;li&gt;FreeBSD: AMD64&lt;/li&gt;
&lt;/ul&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;Installing Grafana Agent Flow on other operating systems is possible, but isn&amp;rsquo;t recommended or supported.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;ul&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/flow/get-started/install/docker/&#34;&gt;Run Grafana Agent Flow in a Docker container&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/flow/get-started/install/kubernetes/&#34;&gt;Deploy Grafana Agent Flow on Kubernetes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/flow/get-started/install/linux/&#34;&gt;Install Grafana Agent Flow on Linux&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/flow/get-started/install/macos/&#34;&gt;Install Grafana Agent Flow on macOS&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/flow/get-started/install/windows/&#34;&gt;Install Grafana Agent Flow on Windows&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/flow/get-started/install/ansible/&#34;&gt;Install Grafana Agent Flow with Ansible&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/flow/get-started/install/chef/&#34;&gt;Install Grafana Agent Flow with Chef&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/flow/get-started/install/puppet/&#34;&gt;Install Grafana Agent Flow with Puppet&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/flow/get-started/install/binary/&#34;&gt;Install Grafana Agent Flow as a standalone binary&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&#34;data-collection&#34;&gt;Data collection&lt;/h2&gt;
&lt;p&gt;By default, Grafana Agent Flow sends anonymous usage information to Grafana Labs. Refer to 
    &lt;a href=&#34;/docs/agent/v0.43/data-collection/&#34;&gt;data collection&lt;/a&gt; for more information
about what data is collected and how you can opt-out.&lt;/p&gt;
]]></content><description>&lt;h1 id="install-grafana-agent-flow">Install Grafana Agent Flow&lt;/h1>
&lt;p>You can install Grafana Agent Flow on Docker, Kubernetes, Linux, macOS, or Windows.&lt;/p>
&lt;p>The following architectures are supported:&lt;/p>
&lt;ul>
&lt;li>Linux: AMD64, ARM64&lt;/li>
&lt;li>Windows: AMD64&lt;/li>
&lt;li>macOS: AMD64 (Intel), ARM64 (Apple Silicon)&lt;/li>
&lt;li>FreeBSD: AMD64&lt;/li>
&lt;/ul>
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p></description></item><item><title>Run Grafana Agent Flow</title><link>https://grafana.com/docs/agent/v0.43/flow/get-started/run/</link><pubDate>Wed, 11 Sep 2024 17:43:35 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.43/flow/get-started/run/</guid><content><![CDATA[&lt;h1 id=&#34;run-grafana-agent-flow&#34;&gt;Run Grafana Agent Flow&lt;/h1&gt;
&lt;p&gt;Use the following pages to learn how to start, restart, and stop Grafana Agent Flow after it is installed.
For installation instructions, refer to 
    &lt;a href=&#34;/docs/agent/v0.43/flow/get-started/install/&#34;&gt;Install Grafana Agent Flow&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/flow/get-started/run/linux/&#34;&gt;Run Grafana Agent Flow on Linux&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/flow/get-started/run/macos/&#34;&gt;Run Grafana Agent Flow on macOS&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/flow/get-started/run/windows/&#34;&gt;Run Grafana Agent Flow on Windows&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
    &lt;a href=&#34;/docs/agent/v0.43/flow/get-started/run/binary/&#34;&gt;Run Grafana Agent Flow as a standalone binary&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
]]></content><description>&lt;h1 id="run-grafana-agent-flow">Run Grafana Agent Flow&lt;/h1>
&lt;p>Use the following pages to learn how to start, restart, and stop Grafana Agent Flow after it is installed.
For installation instructions, refer to
&lt;a href="/docs/agent/v0.43/flow/get-started/install/">Install Grafana Agent Flow&lt;/a>.&lt;/p></description></item><item><title>Grafana Agent Flow deployment topologies</title><link>https://grafana.com/docs/agent/v0.43/flow/get-started/deploy-agent/</link><pubDate>Wed, 11 Sep 2024 17:43:35 +0000</pubDate><guid>https://grafana.com/docs/agent/v0.43/flow/get-started/deploy-agent/</guid><content><![CDATA[

&lt;div data-shared=&#34;/deploy-agent.md&#34;&gt;
            &lt;h1 id=&#34;deploy-grafana-agent&#34;&gt;Deploy Grafana Agent&lt;/h1&gt;
&lt;p&gt;Grafana Agent is a flexible, vendor-neutral telemetry collector. This
flexibility means that Grafana Agent doesn’t enforce a specific deployment topology
but can work in multiple scenarios.&lt;/p&gt;
&lt;p&gt;This page lists common topologies used for deployments of Grafana Agent, when
to consider using each topology, issues you may run into, and scaling
considerations.&lt;/p&gt;
&lt;h2 id=&#34;as-a-centralized-collection-service&#34;&gt;As a centralized collection service&lt;/h2&gt;
&lt;p&gt;Deploying Grafana Agent as a centralized service is recommended for
collecting application telemetry. This topology allows you to use a smaller number of agents to
coordinate service discovery, collection, and remote writing.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/agent/agent-topologies/centralized-collection.png&#34;
  alt=&#34;centralized-collection&#34; width=&#34;2860&#34;
     height=&#34;1653&#34;/&gt;&lt;/p&gt;
&lt;p&gt;Using this topology requires deploying the Agent on separate infrastructure,
and making sure that agents can discover and reach these applications over the
network. The main predictor for the size of the agent is the number of active
metrics series it is scraping; a rule of thumb is approximately 10 KB of memory for each
series. We recommend you start looking towards horizontal scaling around the 1 million
active series mark.&lt;/p&gt;
&lt;h3 id=&#34;using-kubernetes-statefulsets&#34;&gt;Using Kubernetes StatefulSets&lt;/h3&gt;
&lt;p&gt;Deploying Grafana Agent as a StatefulSet is the recommended option for metrics
collection.
The persistent pod identifiers make it possible to consistently match volumes
with pods so that you can use them for the WAL directory.&lt;/p&gt;
&lt;p&gt;You can also use a Kubernetes deployment in cases where persistent storage is not required, such as a traces-only pipeline.&lt;/p&gt;
&lt;h3 id=&#34;pros&#34;&gt;Pros&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Straightforward scaling using 
    &lt;a href=&#34;/docs/agent/v0.43/flow/concepts/clustering/&#34;&gt;clustering&lt;/a&gt; or 
    &lt;a href=&#34;/docs/agent/v0.43/static/operation-guide/&#34;&gt;hashmod sharding&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Minimizes the “noisy neighbor” effect&lt;/li&gt;
&lt;li&gt;Easy to meta-monitor&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;cons&#34;&gt;Cons&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Requires running on separate infrastructure&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;use-for&#34;&gt;Use for&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Scalable telemetry collection&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;dont-use-for&#34;&gt;Don’t use for&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Host-level metrics and logs&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;as-a-host-daemon&#34;&gt;As a host daemon&lt;/h2&gt;
&lt;p&gt;Deploying one Grafana Agent per machine is required for collecting
machine-level metrics and logs, such as node_exporter hardware and network
metrics or journald system logs.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/agent/agent-topologies/daemonset.png&#34;
  alt=&#34;daemonset&#34; width=&#34;1478&#34;
     height=&#34;1492&#34;/&gt;&lt;/p&gt;
&lt;p&gt;Each Grafana Agent requires you to open an outgoing connection for each remote endpoint
it’s shipping data to. This can lead to NAT port exhaustion on the egress
infrastructure. Each egress IP can support up to (65535 - 1024 = 64511)
outgoing connections on different ports. So, if all agents are shipping metrics
and log data, an egress IP can support up to 32,255 agents.&lt;/p&gt;
&lt;h3 id=&#34;using-kubernetes-daemonsets&#34;&gt;Using Kubernetes DaemonSets&lt;/h3&gt;
&lt;p&gt;The simplest use case of the host daemon topology is a Kubernetes DaemonSet,
and it is required for node-level observability (for example cAdvisor metrics) and
collecting pod logs.&lt;/p&gt;
&lt;h3 id=&#34;pros-1&#34;&gt;Pros&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Doesn’t require running on separate infrastructure&lt;/li&gt;
&lt;li&gt;Typically leads to smaller-sized agents&lt;/li&gt;
&lt;li&gt;Lower network latency to instrumented applications&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;cons-1&#34;&gt;Cons&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Requires planning a process for provisioning Grafana Agent on new machines, as well as keeping configuration up to date to avoid configuration drift&lt;/li&gt;
&lt;li&gt;Not possible to scale agents independently when using Kubernetes DaemonSets&lt;/li&gt;
&lt;li&gt;Scaling the topology can strain external APIs (like service discovery) and network infrastructure (like firewalls, proxy servers, and egress points)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;use-for-1&#34;&gt;Use for&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Collecting machine-level metrics and logs (for example, node_exporter hardware metrics, Kubernetes pod logs)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;dont-use-for-1&#34;&gt;Don’t use for&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Scenarios where Grafana Agent grows so large it can become a noisy neighbor&lt;/li&gt;
&lt;li&gt;Collecting an unpredictable amount of telemetry&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;as-a-container-sidecar&#34;&gt;As a container sidecar&lt;/h2&gt;
&lt;p&gt;Deploying Grafana Agent as a container sidecar is only recommended for
short-lived applications or specialized agent deployments.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/agent/agent-topologies/sidecar.png&#34;
  alt=&#34;daemonset&#34; width=&#34;1214&#34;
     height=&#34;1275&#34;/&gt;&lt;/p&gt;
&lt;h3 id=&#34;using-kubernetes-pod-sidecars&#34;&gt;Using Kubernetes pod sidecars&lt;/h3&gt;
&lt;p&gt;In a Kubernetes environment, the sidecar model consists of deploying Grafana Agent
as an extra container on the pod. The pod’s controller, network configuration,
enabled capabilities, and available resources are shared between the actual
application and the sidecar agent.&lt;/p&gt;
&lt;h3 id=&#34;pros-2&#34;&gt;Pros&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Doesn’t require running on separate infrastructure&lt;/li&gt;
&lt;li&gt;Straightforward networking with partner applications&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;cons-2&#34;&gt;Cons&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Doesn’t scale separately&lt;/li&gt;
&lt;li&gt;Makes resource consumption harder to monitor and predict&lt;/li&gt;
&lt;li&gt;Agents do not have a life cycle of their own, making it harder to reason about things like recovering from network outages&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;use-for-2&#34;&gt;Use for&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Serverless services&lt;/li&gt;
&lt;li&gt;Job/batch applications that work with a push model&lt;/li&gt;
&lt;li&gt;Air-gapped applications that can’t be otherwise reached over the network&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;dont-use-for-2&#34;&gt;Don’t use for&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Long-lived applications&lt;/li&gt;
&lt;li&gt;Scenarios where the agent size grows so large it can become a noisy neighbor&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;processing-different-types-of-telemetry-in-different-hahahugoshortcode2488s1hbhb-instances&#34;&gt;Processing different types of telemetry in different Grafana Agent instances&lt;/h2&gt;
&lt;p&gt;If the load on Grafana Agent is small, it is recommended to process all necessary telemetry signals in the same Grafana Agent process.
For example, a single Grafana Agent can process all of the incoming metrics, logs, traces, and profiles.&lt;/p&gt;
&lt;p&gt;However, if the load on the Grafana Agents is big, it may be beneficial to process different telemetry signals in different deployments of Grafana Agents.&lt;/p&gt;
&lt;p&gt;This provides better stability due to the isolation between processes.
For example, an overloaded Grafana Agent processing traces won&amp;rsquo;t impact an Grafana Agent processing metrics.
Different types of signal collection require different methods for scaling:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;Pull&amp;rdquo; components such as &lt;code&gt;prometheus.scrape&lt;/code&gt; and &lt;code&gt;pyroscope.scrape&lt;/code&gt; are scaled using hashmod sharing or clustering.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Push&amp;rdquo; components such as &lt;code&gt;otelcol.receiver.otlp&lt;/code&gt; are scaled by placing a load balancer in front of them.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;traces&#34;&gt;Traces&lt;/h3&gt;
&lt;p&gt;Scaling Grafana Agent instances for tracing is very similar to &lt;a href=&#34;https://opentelemetry.io/docs/collector/scaling/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;scaling OpenTelemetry Collector&lt;/a&gt; instances.
This similarity is because most Grafana Agent Flow components used for tracing are based on components from the OTel Collector.&lt;/p&gt;
&lt;h4 id=&#34;when-to-scale&#34;&gt;When to scale&lt;/h4&gt;
&lt;p&gt;To decide whether scaling is necessary, check metrics such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;receiver_refused_spans_ratio_total&lt;/code&gt; from receivers such as &lt;code&gt;otelcol.receiver.otlp&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;processor_refused_spans_ratio_total&lt;/code&gt; from processors such as &lt;code&gt;otelcol.processor.batch&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;exporter_send_failed_spans_ratio_total&lt;/code&gt; from exporters such as &lt;code&gt;otelcol.exporter.otlp&lt;/code&gt; and &lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;stateful-and-stateless-components&#34;&gt;Stateful and stateless components&lt;/h4&gt;
&lt;p&gt;In the context of tracing, a &amp;ldquo;stateful component&amp;rdquo; is a component
that needs to aggregate certain spans to work correctly.
A &amp;ldquo;stateless Grafana Agent&amp;rdquo; is a Grafana Agent which does not contain stateful components.&lt;/p&gt;
&lt;p&gt;Scaling stateful Grafana Agents is more difficult, because spans must be forwarded to a
specific Grafana Agent according to a span property such as trace ID or a &lt;code&gt;service.name&lt;/code&gt; attribute.
You can forward spans with &lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Examples of stateful components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;otelcol.processor.tail_sampling&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;otelcol.connector.spanmetrics&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;otelcol.connector.servicegraph&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- TODO: link to the otelcol.exporter.loadbalancing docs for more info --&gt;
&lt;p&gt;A &amp;ldquo;stateless component&amp;rdquo; does not need to aggregate specific spans to work correctly -
it can work correctly even if it only has some of the spans of a trace.&lt;/p&gt;
&lt;p&gt;A stateless Grafana Agent can be scaled without using &lt;code&gt;otelcol.exporter.loadbalancing&lt;/code&gt;.
For example, you could use an off-the-shelf load balancer to do a round-robin load balancing.&lt;/p&gt;
&lt;p&gt;Examples of stateless components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;otelcol.processor.probabilistic_sampler&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;otelcol.processor.transform&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;otelcol.processor.attributes&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;otelcol.processor.span&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;div data-shared="/deploy-agent.md">
&lt;h1 id="deploy-grafana-agent">Deploy Grafana Agent&lt;/h1>
&lt;p>Grafana Agent is a flexible, vendor-neutral telemetry collector. This
flexibility means that Grafana Agent doesn’t enforce a specific deployment topology
but can work in multiple scenarios.&lt;/p></description></item></channel></rss>