Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/grafana-agent
Path: blob/main/example/docker-compose/agent/config/agent.yaml
4096 views
1
# This file serves as an example agent configuration to interact with the
2
# docker compose environment.
3
#
4
# You should pass the following command line flags when running the agent
5
# locally and using this file:
6
#
7
# -enable-features=integrations-next -config.expand-env -config.enable-read-api
8
#
9
# -enable-features=integrations-next is required as the file is configured for
10
# the integrations revamp.
11
#
12
# -config.expand-env is required to expand environment variables. Environment
13
# variables are used when running the agent inside of docker-compose to connect
14
# to the other services. When running the agent externally, the expressions will
15
# default to the appropriate values of the exposed ports.
16
#
17
# -config.enable-read-api is optional, but allows you to invoke the /-/config
18
# endpoint to examine the generated config.
19
20
server:
21
log_level: debug
22
23
metrics:
24
global:
25
scrape_interval: 60s
26
remote_write:
27
- url: http://${REMOTE_WRITE_HOST:-localhost:9009}/api/prom/push
28
configs:
29
- name: default
30
scrape_configs:
31
- job_name: avalanche
32
static_configs:
33
- targets: ['${AVALANCHE_HOST:-localhost:9001}']
34
35
logs:
36
configs:
37
- name: default
38
clients:
39
- url: http://${LOKI_HOST:-localhost:3100}/loki/api/v1/push
40
positions:
41
filename: /tmp/positions.yaml
42
scrape_configs:
43
## Uncomment to read logs from /var/log
44
#- job_name: system
45
# static_configs:
46
# - targets: [localhost]
47
# labels:
48
# job: varlogs
49
# __path__: /var/log/*log
50
51
traces:
52
configs:
53
- name: default
54
remote_write:
55
- endpoint: ${TEMPO_HOST:-localhost:4317}
56
insecure: true
57
receivers:
58
jaeger:
59
protocols:
60
thrift_http:
61
62
#
63
# Integrations
64
#
65
# Uncomment individual integrations below to enable them. Some integrations are
66
# enabled by default.
67
#
68
69
integrations:
70
metrics:
71
autoscrape:
72
enable: true
73
metrics_instance: default
74
75
# agent
76
agent:
77
# The Agent dashboards are written to assume Kubernetes, so we inject some
78
# fake Kubernetes labels here.
79
extra_labels:
80
cluster: docker-compose
81
namespace: docker-compose
82
container: grafana-agent
83
pod: grafana-agent-${HOSTNAME:-example}
84
85
## node_exporter
86
# node_exporter: {}
87
88
## process
89
# process:
90
# process_names:
91
# - name: "{{.Comm}}"
92
# cmdline:
93
# - '.+'
94
95
## mysql (requires docker-compose mysql profile)
96
# mysql_configs:
97
# - data_source_name: root@(${MYSQL_HOST:-localhost:3306})/
98
99
## postgres (requires docker-compose postgres profile)
100
# postgres_configs:
101
# - data_source_names:
102
# - postgresql://postgres:password@localhost:5432/postgres?sslmode=disable
103
104
## redis (requires docker-compose redis profile)
105
# redis_configs:
106
# - redis_addr: ${REDIS_HOST:-localhost:6379}
107
108
## dnsmasq (requires docker-compose dnsmasq profile)
109
# dnsmasq_configs:
110
# - dnsmasq_address: ${DNSMASQ_HOST:-localhost:30053}
111
# leases_path: /tmp/dnsmasq-leases/dnsmasq.leases
112
113
## memcached (requires docker-compose memcached profile)
114
# memcached_configs:
115
# - memcached_address: ${MEMCACHED_HOST:-localhost:11211}
116
# timeout: 10s
117
118
## statsd
119
# statsd: {}
120
121
## consul (requires docker-compose consul profile)
122
# consul_configs:
123
# - server: http://${CONSUL_HOST:-localhost:8500}
124
125
## elasticsearch (requires docker-compose elasticsearch profile)
126
# elasticsearch_configs:
127
# - address: http://${ELASTICSEARCH_HOST:-localhost:9200}
128
129
## kafka (requires docker-compose kafka profile)
130
# kafka_configs:
131
# - kafka_uris: [${KAFKA_HOST:-localhost:9093}]
132
133
## github (requires docker-compose github profile)
134
# github_configs:
135
# - repositories:
136
# - grafana/agent
137
138
## mongodb (requires docker-compose mongodb profile)
139
# mongodb_configs:
140
# - mongodb_uri: mongodb://${MONGODB_HOST:-mongodb:27017}
141
# relabel_configs:
142
# - source_labels: [__address__]
143
# target_label: service_name
144
# replacement: 'mongodb'
145
# - source_labels: [__address__]
146
# target_label: mongodb_cluster
147
# replacement: 'mongodb-cluster'
148
149
## cadvisor
150
# cadvisor:
151
# disabled_metrics:
152
# - disk
153
# enabled_metrics:
154
# - percpu
155
156
157