Skip to content

Commit b38f62d

Browse files
authored
[+] add PlantUML diagrams (#926)
1 parent b9bfb97 commit b38f62d

File tree

3 files changed

+114
-0
lines changed

3 files changed

+114
-0
lines changed

docs/uml/.styles.puml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
@startuml .styles
2+
!theme plain
3+
' Set background and font color
4+
skinparam backgroundColor #f4f7fa
5+
skinparam defaultTextAlignment center
6+
skinparam shadowing false
7+
skinparam titleFontColor #1c4063
8+
skinparam titleFontSize 20
9+
skinparam titleFontName Arial
10+
skinparam noteBackgroundColor #eaf0f6
11+
skinparam noteBorderColor #1c4063
12+
13+
' General border and font color
14+
skinparam componentBorderColor #1c4063
15+
skinparam componentFontColor #222222
16+
skinparam componentBackgroundColor #eaf0f6
17+
skinparam databaseBorderColor #1c4063
18+
skinparam databaseFontColor #222222
19+
skinparam databaseBackgroundColor #dbe9f6
20+
skinparam packageBorderColor #1c4063
21+
skinparam packageTitleFontColor #1c4063
22+
skinparam packageBackgroundColor #eaf0f6
23+
24+
skinparam ArrowColor #467fcf
25+
skinparam ArrowFontColor #1c4063
26+
27+
skinparam packageStyle rectangle
28+
skinparam componentStyle rectangle
29+
skinparam databaseStyle rectangle
30+
skinparam direction top to bottom
31+
skinparam minClassWidth 200
32+
skinparam wrapWidth 200
33+
@enduml

docs/uml/patroni-prometheus.puml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
@startuml patroni-prometheus
2+
3+
!include .styles.puml
4+
5+
title pgwatch with Prometheus - Direct patroni nodes conninfo
6+
7+
!include patroni.puml
8+
9+
package "pgwatch related"{
10+
11+
node pgwatch [
12+
**pgwatch**
13+
----
14+
--config=postgresql://[email protected]/pgwatch
15+
--sink=prometheus://:9187/pgwatch
16+
]
17+
18+
database pgwatch_config_db [
19+
Postgres Config DB
20+
----
21+
- Monitored nodes settings
22+
- Metric Definitions
23+
----
24+
IP: 10.0.0.42
25+
Database: pgwatch
26+
]
27+
28+
29+
pgwatch -up-> postgres1: fetch metric measurements
30+
pgwatch -up-> postgres2: fetch metric measurements
31+
pgwatch -up-> postgres3: fetch metric measurements
32+
33+
pgwatch ..left..> pgwatch_config_db: reads metrics and monitored sources
34+
35+
}
36+
37+
component Grafana
38+
39+
component Prometheus
40+
41+
Prometheus -up=> pgwatch: scrapes new measurements
42+
Grafana -up=> Prometheus: reads data and shows graphs
43+
44+
@enduml

docs/uml/patroni.puml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
@startuml patroni
2+
3+
!include .styles.puml
4+
5+
package "patroni cluster"{
6+
7+
node etcd [
8+
**etcd**
9+
----
10+
Key-Value Store
11+
]
12+
13+
database postgres1 [
14+
**postgres1**
15+
----
16+
primary
17+
]
18+
19+
database postgres2 [
20+
**postgres2**
21+
----
22+
standby
23+
]
24+
25+
database postgres3 [
26+
**postgres3**
27+
----
28+
standby
29+
]
30+
31+
32+
postgres1 -up-> etcd
33+
postgres2 -up-> etcd
34+
postgres3 -up-> etcd
35+
36+
}
37+
@enduml

0 commit comments

Comments
 (0)