forked from PinSpace-Org/GistPin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog-routing.yml
More file actions
68 lines (61 loc) 路 1.49 KB
/
Copy pathlog-routing.yml
File metadata and controls
68 lines (61 loc) 路 1.49 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
routes:
- name: backend-errors
match: "kubernetes.**gistpin-backend**"
conditions:
- field: level
operator: in
values: [error, fatal, critical]
destinations:
- elasticsearch
- alertmanager
priority: high
- name: backend-info
match: "kubernetes.**gistpin-backend**"
conditions:
- field: level
operator: in
values: [info, debug, warn]
destinations:
- elasticsearch
priority: normal
- name: frontend-logs
match: "kubernetes.**gistpin-frontend**"
destinations:
- elasticsearch
priority: normal
- name: postgres-logs
match: "kubernetes.**postgres**"
conditions:
- field: message
operator: contains
values: ["slow query", "deadlock", "ERROR"]
destinations:
- elasticsearch
- alertmanager
priority: high
- name: system-logs
match: "system.**"
destinations:
- elasticsearch
priority: low
destinations:
elasticsearch:
type: elasticsearch
host: "${ELASTICSEARCH_HOST:-elasticsearch}"
port: 9200
index_prefix: gistpin
retention_days: 30
alertmanager:
type: webhook
url: "${ALERTMANAGER_URL:-http://alertmanager:9093}/api/v1/alerts"
method: POST
enrichment:
fields:
- source: kubernetes.namespace_name
target: namespace
- source: kubernetes.pod_name
target: pod
- source: kubernetes.container_name
target: container
- source: kubernetes.labels.app
target: app