Menu
Documentation
Grafana Cloud
Instrument and send data
Grafana Agent
Static mode
Set up static mode
Install static mode
Docker
Grafana Cloud
Run Grafana Agent in static mode in a Docker container
Grafana Agent is available as a Docker container image on the following platforms:
- Linux containers for AMD64 and ARM64.
- Windows containers for AMD64.
Before you begin
- Install Docker on your computer.
- Create and save a Grafana Agent YAML configuration file on your computer.
Run a Linux Docker container
To run a Grafana Agent Docker container on Linux, run the following command in a terminal window:
shell
docker run \
-v WAL_DATA_DIRECTORY:/etc/agent/data \
-v CONFIG_FILE_PATH:/etc/agent/agent.yaml \
grafana/agent:v0.40.3
Replace CONFIG_FILE_PATH
with the configuration file path on your Linux host system.
Note
For the flags to work correctly, you must expose the paths on your Linux host to the Docker container through a bind mount.
Run a Windows Docker container
To run a Grafana Agent Docker container on Windows, run the following command in a Windows command prompt:
shell
docker run ^
-v WAL_DATA_DIRECTORY:C:\etc\grafana-agent\data ^
-v CONFIG_FILE_PATH:C:\etc\grafana-agent ^
grafana/agent:v0.40.3-windows
Replace the following:
CONFIG_FILE_PATH
: The configuration file path on your Windows host system.WAL_DATA_DIRECTORY
: the directory used to store your metrics before sending them to Prometheus. Old WAL data is cleaned up every hour and is used for recovery if the process crashes.
Note
For the flags to work correctly, you must expose the paths on your Windows host to the Docker container through a bind mount.
Next steps
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
![Getting started with the Grafana LGTM Stack](/static/assets/featured/getting-started-with-grafana-lgtm-stack-amer_featured.png?w=200 200w, /static/assets/featured/getting-started-with-grafana-lgtm-stack-amer_featured.png?w=400 400w)
Getting started with the Grafana LGTM Stack
In this webinar, we’ll demo how to get started using the LGTM Stack: Loki for logs, Grafana for visualization, Tempo for traces, and Mimir for metrics.
![Intro to Kubernetes monitoring in Grafana Cloud](/media/webinar/Screenshot-2024-02-12-at-4.09.30-PM.png?w=200 200w, /media/webinar/Screenshot-2024-02-12-at-4.09.30-PM.png?w=400 400w)
Intro to Kubernetes monitoring in Grafana Cloud
In this webinar you’ll learn how Grafana offers developers and SREs a simple and quick-to-value solution for monitoring their Kubernetes infrastructure.
![Building advanced Grafana dashboards](/media/webinar/AMER_buildadv_notxt.png?w=200 200w, /media/webinar/AMER_buildadv_notxt.png?w=400 400w)
Building advanced Grafana dashboards
In this webinar, we’ll demo how to build and format Grafana dashboards.