Menu

Caution

Grafana Alloy is the new name for our distribution of the OTel collector. Grafana Agent has been deprecated and is in Long-Term Support (LTS) through October 31, 2025. Grafana Agent will reach an End-of-Life (EOL) on November 1, 2025. Read more about why we recommend migrating to Grafana Alloy.

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Open source

Install Grafana Agent Flow with Puppet

You can use Puppet to install and manage Grafana Agent Flow.

Before you begin

  • These steps assume you already have a working Puppet setup.
  • You can add the following manifest to any new or existing module.
  • The manifest installs Grafana Agent Flow from the package repositories. It targets Linux systems from the following families:
    • Debian (including Ubuntu)
    • RedHat Enterprise Linux (including Fedora)

Steps

To add Grafana Agent Flow to a host:

  1. Ensure that the following module dependencies are declared and installed:

    json
    {
    "name": "puppetlabs/apt",
    "version_requirement": ">= 4.1.0 <= 7.0.0"
    },
    {
    "name": "puppetlabs/yumrepo_core",
    "version_requirement": "<= 2.0.0"
    }
  2. Create a new Puppet manifest with the following class to add the Grafana package repositories, install the grafana-agent-flow package, and run the service:

    ruby
    class grafana_agent::grafana_agent_flow () {
      case $::os['family'] {
        'debian': {
          apt::source { 'grafana':
            location => 'https://apt.grafana.com/',
            release  => '',
            repos    => 'stable main',
            key      => {
              id     => 'B53AE77BADB630A683046005963FA27710458545',
              source => 'https://apt.grafana.com/gpg.key',
            },
          } -> package { 'grafana-agent-flow':
            require => Exec['apt_update'],
          } -> service { 'grafana-agent-flow':
            ensure    => running,
            name      => 'grafana-agent-flow',
            enable    => true,
            subscribe => Package['grafana-agent-flow'],
          }
        }
        'redhat': {
          yumrepo { 'grafana':
            ensure   => 'present',
            name     => 'grafana',
            descr    => 'grafana',
            baseurl  => 'https://packages.grafana.com/oss/rpm',
            gpgkey   => 'https://packages.grafana.com/gpg.key',
            enabled  => '1',
            gpgcheck => '1',
            target   => '/etc/yum.repo.d/grafana.repo',
          } -> package { 'grafana-agent-flow':
          } -> service { 'grafana-agent-flow':
            ensure    => running,
            name      => 'grafana-agent-flow',
            enable    => true,
            subscribe => Package['grafana-agent-flow'],
          }
        }
        default: {
          fail("Unsupported OS family: (${$::os['family']})")
        }
      }
    }
  3. To use this class in a module, add the following line to the module’s init.pp file:

    ruby
    include grafana_agent::grafana_agent_flow

Configuration

The grafana-agent-flow package installs a default configuration file that doesn’t send telemetry anywhere.

The default configuration file location is /etc/grafana-agent-flow.river. You can replace this file with your own configuration, or create a new configuration file for the service to use.

Next steps