-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.alloy
79 lines (65 loc) · 1.61 KB
/
config.alloy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
logging {
level = "debug"
// Forward internal logs to the local Loki instance.
write_to = [loki.relabel.alloy_logs.receiver]
}
loki.relabel "alloy_logs" {
rule {
target_label = "instance"
replacement = constants.hostname
}
rule {
target_label = "job"
replacement = "integrations/self"
}
forward_to = [loki.write.loki.receiver]
}
tracing {
// Write all spans. Don't do this in production!
sampling_fraction = 1.0
// Forward internal spans to the local Tempo instance.
write_to = [otelcol.exporter.otlp.tempo.input]
}
// Collect metrics from the local running Alloy instance and forward to Prometheus.
prometheus.exporter.self "alloy" {}
prometheus.scrape "alloy" {
targets = prometheus.exporter.self.alloy.targets
forward_to = [prometheus.remote_write.mimir.receiver]
}
// prometheus.exporter.node_exporter "node_exporter" {}
prometheus.scrape "node_exporter" {
targets = [
{"__address__" = "node_exporter:9100", "job" = "node_exporter"},
]
forward_to = [prometheus.remote_write.mimir.receiver]
}
// Collect profiles from the local running Alloy instance and forward to Pyroscope.
pyroscope.scrape "default" {
targets = [
{"__address__" = "localhost:12345", "service_name" = "alloy"},
]
forward_to = [pyroscope.write.pyroscope.receiver]
}
prometheus.remote_write "mimir" {
endpoint {
url = "http://mimir:9009/api/v1/push"
}
}
loki.write "loki" {
endpoint {
url = "http://loki:3100/loki/api/v1/push"
}
}
otelcol.exporter.otlp "tempo" {
client {
endpoint = "tempo:4317"
tls {
insecure = true
}
}
}
pyroscope.write "pyroscope" {
endpoint {
url = "http://pyroscope:4040"
}
}