Path: blob/main/example/docker-compose/agent/config/agent.yaml
4096 views
# This file serves as an example agent configuration to interact with the1# docker compose environment.2#3# You should pass the following command line flags when running the agent4# locally and using this file:5#6# -enable-features=integrations-next -config.expand-env -config.enable-read-api7#8# -enable-features=integrations-next is required as the file is configured for9# the integrations revamp.10#11# -config.expand-env is required to expand environment variables. Environment12# variables are used when running the agent inside of docker-compose to connect13# to the other services. When running the agent externally, the expressions will14# default to the appropriate values of the exposed ports.15#16# -config.enable-read-api is optional, but allows you to invoke the /-/config17# endpoint to examine the generated config.1819server:20log_level: debug2122metrics:23global:24scrape_interval: 60s25remote_write:26- url: http://${REMOTE_WRITE_HOST:-localhost:9009}/api/prom/push27configs:28- name: default29scrape_configs:30- job_name: avalanche31static_configs:32- targets: ['${AVALANCHE_HOST:-localhost:9001}']3334logs:35configs:36- name: default37clients:38- url: http://${LOKI_HOST:-localhost:3100}/loki/api/v1/push39positions:40filename: /tmp/positions.yaml41scrape_configs:42## Uncomment to read logs from /var/log43#- job_name: system44# static_configs:45# - targets: [localhost]46# labels:47# job: varlogs48# __path__: /var/log/*log4950traces:51configs:52- name: default53remote_write:54- endpoint: ${TEMPO_HOST:-localhost:4317}55insecure: true56receivers:57jaeger:58protocols:59thrift_http:6061#62# Integrations63#64# Uncomment individual integrations below to enable them. Some integrations are65# enabled by default.66#6768integrations:69metrics:70autoscrape:71enable: true72metrics_instance: default7374# agent75agent:76# The Agent dashboards are written to assume Kubernetes, so we inject some77# fake Kubernetes labels here.78extra_labels:79cluster: docker-compose80namespace: docker-compose81container: grafana-agent82pod: grafana-agent-${HOSTNAME:-example}8384## node_exporter85# node_exporter: {}8687## process88# process:89# process_names:90# - name: "{{.Comm}}"91# cmdline:92# - '.+'9394## mysql (requires docker-compose mysql profile)95# mysql_configs:96# - data_source_name: root@(${MYSQL_HOST:-localhost:3306})/9798## postgres (requires docker-compose postgres profile)99# postgres_configs:100# - data_source_names:101# - postgresql://postgres:password@localhost:5432/postgres?sslmode=disable102103## redis (requires docker-compose redis profile)104# redis_configs:105# - redis_addr: ${REDIS_HOST:-localhost:6379}106107## dnsmasq (requires docker-compose dnsmasq profile)108# dnsmasq_configs:109# - dnsmasq_address: ${DNSMASQ_HOST:-localhost:30053}110# leases_path: /tmp/dnsmasq-leases/dnsmasq.leases111112## memcached (requires docker-compose memcached profile)113# memcached_configs:114# - memcached_address: ${MEMCACHED_HOST:-localhost:11211}115# timeout: 10s116117## statsd118# statsd: {}119120## consul (requires docker-compose consul profile)121# consul_configs:122# - server: http://${CONSUL_HOST:-localhost:8500}123124## elasticsearch (requires docker-compose elasticsearch profile)125# elasticsearch_configs:126# - address: http://${ELASTICSEARCH_HOST:-localhost:9200}127128## kafka (requires docker-compose kafka profile)129# kafka_configs:130# - kafka_uris: [${KAFKA_HOST:-localhost:9093}]131132## github (requires docker-compose github profile)133# github_configs:134# - repositories:135# - grafana/agent136137## mongodb (requires docker-compose mongodb profile)138# mongodb_configs:139# - mongodb_uri: mongodb://${MONGODB_HOST:-mongodb:27017}140# relabel_configs:141# - source_labels: [__address__]142# target_label: service_name143# replacement: 'mongodb'144# - source_labels: [__address__]145# target_label: mongodb_cluster146# replacement: 'mongodb-cluster'147148## cadvisor149# cadvisor:150# disabled_metrics:151# - disk152# enabled_metrics:153# - percpu154155156157