Caution
Grafana Agent has reached End-of-Life (EOL) on November 1, 2025. Agent is no longer receiving vendor support and will no longer receive security or bug fixes. Current users of Agent Static mode, Agent Flow mode, and Agent Operator should proceed with migrating to Grafana Alloy. If you have already migrated to Alloy, no further action is required. 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.
01 AWS
The AWS datasource assumes that you have appropriate credentials and environment variables set to access AWS resources. The custom fork of gomplate adds a new command to the existing AWS commands.
Unfortunately there is not a specific docker command but generic examples are below.
Looping
server:
log_level: debug
metrics:
wal_directory: /tmp/grafana-agent-normal
global:
scrape_interval: 60s
remote_write:
- url: https://prometheus-us-central1.grafana.net/api/prom/push
basic_auth:
username: xyz
password: secretpassword
configs:
- name: default
scrape_configs:
{{ range $index , $value := aws.EC2Query "tag:service=webhost" -}}
- job_name: {{ $value.InstanceId }}
static_configs:
- targets:
- {{ $value.PrivateDnsName }}
{{ end -}}The aws.EC2Query command is a new command added for Grafana Agent and takes a string in the DescribeInstances format



