forked from west2-online/fzuhelper-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.alloy
More file actions
96 lines (81 loc) · 1.84 KB
/
Copy pathconfig.alloy
File metadata and controls
96 lines (81 loc) · 1.84 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*********************************************
* loki 文件管道
*********************************************/
local.file_match "local_files" {
path_targets = [{"__path__" = "/var/log/*/*/*/*.log"}]
sync_period = "5s"
}
loki.source.file "log_scrape" {
targets = local.file_match.local_files.targets
forward_to = [loki.process.filter_logs.receiver]
tail_from_end = true
}
loki.process "filter_logs" {
stage.drop {
source = ""
expression = ".*Connection closed by authenticating user root"
drop_counter_reason = "noisy"
}
forward_to = [loki.process.add_labels.receiver]
}
loki.process "add_labels" {
stage.json {
expressions = {
service = "",
level = "",
trace_id = "",
span_id = "",
}
}
stage.labels {
values = {
level = "level",
service = "service",
}
}
stage.structured_metadata {
values = {
trace_id = "trace_id",
span_id = "span_id",
}
}
forward_to = [loki.write.grafana_loki.receiver]
}
loki.write "grafana_loki" {
endpoint {
url = "http://fzuhelper-loki:3100/loki/api/v1/push"
// basic_auth {
// username = "admin"
// password = "admin"
// }
}
}
/*********************************************
* otlp管道
* 流程:otelcol.receiver -> processor -> exporter -> Tempo后端
*********************************************/
otelcol.receiver.otlp "ingest" {
grpc {
endpoint = "0.0.0.0:4317"
}
http {
endpoint = "0.0.0.0:4318"
}
output {
traces = [otelcol.processor.batch.traces.input]
}
}
otelcol.processor.batch "traces" {
output {
traces = [otelcol.exporter.otlp.tempo.input]
}
}
otelcol.exporter.otlp "tempo" {
client {
endpoint = "fzuhelper-tempo:4317"
tls {
insecure = true
insecure_skip_verify = true
}
}
}