-
Notifications
You must be signed in to change notification settings - Fork 38
/
prometheus_thanos.d2
executable file
·118 lines (102 loc) · 2.98 KB
/
prometheus_thanos.d2
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/usr/bin/env d2
#
# vim:ts=2:sts=2:sw=2:et:filetype=d2
#
# Author: Hari Sekhon
# Date: 2024-09-12 01:14:18 +0200 (Thu, 12 Sep 2024)
#
# https///github.com/HariSekhon/Diagrams-as-Code
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
#
# https://www.linkedin.com/in/HariSekhon
#
# ============================================================================ #
# P r o m e t h e u s & T h a n o s
# ============================================================================ #
title: {
label: Prometheus & Thanos
near: top-center
shape: text
style.font-size: 40
style.underline: true
}
classes: {
thanos: {
label: Thanos
icon: https://diagrams.mingrammer.com/img/resources/onprem/monitoring/thanos.png
shape: image
}
prometheus: {
label: Prometheus
icon: https://diagrams.mingrammer.com/img/resources/onprem/monitoring/prometheus.png
shape: image
}
exporter: {
label: Prometheus\nExporters
icon: https://gitlab.developers.cam.ac.uk/uploads/-/system/project/avatar/1783/node_exporter_logo.png
shape: image
height: 80
width: 80
}
alertmanager: {
label: Prometheus\nAlertManager
icon: https://diagrams.mingrammer.com/img/resources/onprem/monitoring/prometheus.png
shape: image
}
grafana: {
label: Grafana
icon: https://diagrams.mingrammer.com/img/resources/onprem/monitoring/grafana.png
shape: image
}
pagerduty: {
label: Pagerduty
icon: https://raw.githubusercontent.com/simple-icons/simple-icons/develop/icons/pagerduty.svg
shape: image
}
}
grafana.class: grafana
thanos_querier.class: thanos
thanos_querier.label: Thanos\nQuerier
thanos1.class: thanos
thanos2.class: thanos
thanos3.class: thanos
prometheus1.class: prometheus
prometheus2.class: prometheus
prometheus3.class: prometheus
exporter1.class: exporter
exporter2.class: exporter
exporter3.class: exporter
alertmanager.class: alertmanager
pagerduty.class: pagerduty
grafana -> thanos_querier: {label: query}
thanos_querier -> thanos1 -> prometheus1: {label: query}
thanos_querier -> thanos2 -> prometheus2: {label: query}
thanos_querier -> thanos3 -> prometheus3: {label: query}
prometheus1 <-> exporter1: {
label: metrics polling
style.stroke-dash: 5
}
prometheus2 <-> exporter2: {
label: metrics polling
style.stroke-dash: 5
}
prometheus3 <-> exporter3: {
label: metrics polling
style.stroke-dash: 5
}
# invisible: {
# width: 1
# height: 1
# style.opacity: 0
# }
# arrows to a blank space and then more arrows from blank to alertmanager doesn't look nice
# prometheus1 -> invisible -> alertmanager
# prometheus2 -> invisible -> alertmanager
# prometheus3 -> invisible -> alertmanager
prometheus1 -> alertmanager: {label: alerts}
prometheus2 -> alertmanager: {label: alerts}
prometheus3 -> alertmanager: {label: alerts}
alertmanager -> pagerduty: {label: alerts}