-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathelasticsearch_queries.d2
executable file
·98 lines (80 loc) · 2.62 KB
/
elasticsearch_queries.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
#!/usr/bin/env d2 --theme 200
#
# vim:ts=2:sts=2:sw=2:et:filetype=d2
#
# Author: Hari Sekhon
# Date: 2024-08-25 03:45:23 +0200 (Sun, 25 Aug 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
#
# ============================================================================ #
# E l a s t i c s e a r c h Q u e r i e s
# ============================================================================ #
direction: right
title: {
label: Elasticsearch Queries
near: top-center
shape: text
style.font-size: 40
style.underline: true
}
classes: {
users: {
label: Users
icon: https://icons.terrastruct.com/essentials%2F359-users.svg
# icon: https://diagrams.mingrammer.com/img/resources/onprem/client/users.png
shape: image
}
apps: {
label: Apps
icon: https://icons.terrastruct.com/azure%2FIntune%20Service%20Color%2FClient%20Apps.svg
shape: image
}
elasticsearch: {
icon: https://diagrams.mingrammer.com/img/resources/elastic/saas/elastic.png
shape: image
}
kibana: {
label: Kibana
icon: https://diagrams.mingrammer.com/img/resources/elastic/elasticsearch/kibana.png
shape: image
}
}
# ============================================================================ #
# N o d e s
# ============================================================================ #
kibana.class: kibana
users.class: users
apps.class: apps
es_node1: Elasticsearch\nClient Node\n(Query Coordinator\n& Aggregator) {
class: elasticsearch
}
es_node2: Elasticsearch\nData Node 1 {
class: elasticsearch
}
es_node3: Elasticsearch\nData Node 2 {
class: elasticsearch
}
es_node4: Elasticsearch\nMaster Node {
class: elasticsearch
}
# ============================================================================ #
# F l o w
# ============================================================================ #
users -> kibana: UI\nSearch {style.animated: true}
kibana -> es_node1: API\nquery {style.animated: true}
users -> es_node1: API\nquery\n(code) {style.stroke-dash: 3}
apps -> es_node1: API\nquery {style.stroke-dash: 3}
# users -- apps
es_node1 -> es_node2: query {style.animated: true}
es_node1 -> es_node3: query {style.animated: true}
es_node1 <- es_node2: response
es_node1 <- es_node3: response
es_node2 -- es_node4: shard management
es_node3 -- es_node4: shard maangement