Getting started with Grafana Agent

Getting started with Grafana Agent

This guide helps users get started with the Grafana Agent. For getting started with the Grafana Agent Operator, please refer to the Operator-specific documentation.

Currently, there are six ways to install the agent:

Docker container

docker run \
  -v /tmp/agent:/etc/agent/data \
  -v /path/to/config.yaml:/etc/agent/agent.yaml \
  grafana/agent:v0.18.4

Replace /tmp/agent with the folder you wish to store WAL data in. WAL data is where metrics are stored before they are sent to Prometheus. Old WAL data is cleaned up every hour, and will be used for recovering if the process happens to crash.

To override the default flags passed to the container, add the following flags to the end of the docker run command:

  • --config.file=path/to/agent.yaml, replacing the argument with the full path to your Agent’s YAML configuration file.

  • --prometheus.wal-directory=/tmp/agent/data, replacing /tmp/agent/data with the directory you wish to use for storing data. Note that /tmp may get deleted by most operating systems after a reboot.

Note that using paths on your host machine must be exposed to the Docker container through a bind mount for the flags to work properly.

Kubernetes manifests

If you wish to manually modify the Kubernetes manifests before deploying them, you can do so by downloading them from the kubernetes directory. Note that these manifests do not include Agent configuration files. For sample configuration, please see the Grafana Cloud Kubernetes quickstarts.

Grafana Cloud kubernetes quickstart guides

These guides help you get up and running with the Agent and Grafana Cloud, and include sample ConfigMaps.

You can find them in the Grafana Cloud documentation

Install locally

Our Releases page contains instructions for downloading static binaries that are published with every release. These releases contain the plain binary alongside system packages for Windows, Red Hat, and Debian.

Tanka

We provide Tanka configurations in our production/ directory.