Skip to content

Commit

Permalink
release v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
olton committed May 30, 2021
2 parents 8f2bca5 + 95d4ea7 commit 3625746
Show file tree
Hide file tree
Showing 46 changed files with 2,036 additions and 727 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.idea
output
dist
private
packages/**/lib
packages/**/dist
node_modules
Expand All @@ -14,4 +15,5 @@ packages/**/coverage
.coverage
client/config.json
server/config.mjs
server/config.json
server/config.json
server/cert
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### 1.0.2
+ [x] Added cpu threads load chart
+ [x] Re-disposition RAM and CPU panels content
+ [x] Added https server creation. Use server conf option `https` to set paths to cert and key
+ [x] Added dark/light modes
+ [x] Visual improvements

### 1.0.1
+ [x] Added php proxy server
+ [x] Added uptime values from sidecar (parsed from http://uptime.minaprotocol.com)
Expand Down
31 changes: 30 additions & 1 deletion HOWTO.EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ Copy the files from the `server` folder of the repository to a convenient place
Next, we have two options:
1) We open a port on the Mina server to access GraphQL for the Monitor server side
2) We forward the GraphQL port using SSH from the Mina server to the Monitor server
3) We forward the Monitor Server port using SSH from the Mina server to your local computer

**Option 1**
Open the GraphQL port (flag `-insecure-rest-server` when starting Mina).
Expand Down Expand Up @@ -252,4 +253,32 @@ In the client's configuration file, we write:
}
```

Compile and run with any of the options listed above.
Compile and run with any of the options listed above.

**Option 3**
Let you start the monitor server on a computer with an ip address of `1.1.1.1` and port` 8000`.
The server config states

```json
{
"host": "1.1.1.1:8000"
}
```

We forward the Monitor Server with the command
```shell
ssh -L 8000: 1.1.1.1: 8000 [email protected]
```

After executing this command, the server side of the monitor will work locally on port 8000.
Now you can specify in the settings:

For client:

```json
{
"hosts": {
"node1": "localhost: 8000"
}
}
```
30 changes: 29 additions & 1 deletion HOWTO.RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ npm run serve_x
Далее у нас два варианта:
1) Мы открываем порт на сервере Mina для доступа к GraphQL для серверной части Монитора
2) Мы пробрасываем порт GraphQL средствами SSH от сервера Mina на сервер Монитора
3) Мы пробрасываем порт Monitor Server средствами SSH от сервера Mina на ваш локальный компьютер

**Вариант 1**
Открываем порт GraphQL (флаг `-insecure-rest-server` при запуске Mina).
Expand Down Expand Up @@ -238,4 +239,31 @@ node monitor.mjs
}
```

Компилируем и запускаем любым из вариантов.
Компилируем и запускаем любым из вариантов.

**Вариант 3**
Пусть вы запустили сервер монитора на компьютере с ip адресом `1.1.1.1` и портом `8000`.
В конфигурации сервера указано

```json
{
"host": "1.1.1.1:8000"
}
```

Пробрасываем Monitor Server командой
```shell
ssh -L 8000:1.1.1.1:8000 [email protected]
```
После выполнения этой команды у вас локально на порту 8000 будет работать серверная часть монитора.
Теперь вы можете указать в настройках:

Для Клиента:

```json
{
"hosts": {
"node1": "localhost:8000"
}
}
```
15 changes: 11 additions & 4 deletions README.RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- клиент - JavaScript, HTML, CSS

### Использованы компоненты
+ [x] [Mina Node Monitor]() by [Serhii Pimenov](https://github.com/olton)
+ [x] [Mina Node Monitor](https://github.com/olton/mina-node-monitor) by [Serhii Pimenov](https://github.com/olton)
+ [x] [Metro 4](https://github.com/olton/Metro-UI-CSS) by [Serhii Pimenov](https://github.com/olton)
+ [x] [ChartJS](https://github.com/olton/chartjs) by [Serhii Pimenov](https://github.com/olton)
+ [x] [SystemInformation](https://github.com/sebhildebrandt/systeminformation) by [Sebastian Hildebrandt](https://github.com/sebhildebrandt)
Expand Down Expand Up @@ -53,7 +53,7 @@ npm i
```json
{
"hosts": {
"node1": "192.168.1.2:3085"
"node1": "xxx.xxx.xxx.xxx:xxxx"
},
"useHost": "node1",
"intervals": {
Expand All @@ -66,13 +66,14 @@ npm i
"cpu": 2000,
"uptime": 600000
},
"theme": "auto",
"useProxy": false,
"proxy": "https://server/proxy.php"
}
```

Секция `hosts` содержит информацию о серверах, на которых установлена серверная часть Монитора.
Каждый адрес должен определять открытый внешний сетевой интерфейс и его порт.
Каждый адрес должен определять открытый внешний сетевой интерфейс/ip и его порт.
Параметр `useHost` определяет какой сервер из списка в секции `hosts` будет использоваться.
Параметр `showIp` определяет показывать или нет IP адрес в блоке **HOSTNAME** (иногда не стоит светить IP адрес).

Expand All @@ -90,6 +91,7 @@ npm i
- `mem` - интервал обновления информации о загрузке оперативной памяти сервера
- `cpu` - интервал обновления информации о загрузке CPU(s)
- `uptime` - interval for retrieve information about sidecar calculating server uptime
- `theme` - default `auto` (dark\light mode dependence from os), value can be `dark`, `light`

Section for using proxy (читайте про прокси-сервер ниже)
- `useProxy` - use or not proxy server
Expand All @@ -110,7 +112,11 @@ Section for using proxy (читайте про прокси-сервер ниж
"restartAfter": 30,
"restartCmd": "systemctl --user restart mina",
"host": "192.168.1.2:3085",
"graphql": "localhost:3085"
"graphql": "localhost:3085",
"https": {
"key": "",
"cert": ""
}
}
```

Expand All @@ -128,6 +134,7 @@ where
- `canRestartNode` - Если значение этого ключа **true**, сервер может перезапустить узел мины
- `restartAfter` - значение в минутах, если узел синхронизирован, но при этом отстает по высоте блоков от Mina Explorer в течении указанного времени, узел будет перезапущен
- `restartCmd` - Команда для перезапуска узла Mina
- `https` - contains paths to cert and key to create https server

### Сборка клиентского приложения

Expand Down
15 changes: 11 additions & 4 deletions README.UA.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- кліент - JavaScript, HTML, CSS

### Використано компоненти
+ [x] [Mina Node Monitor]() by [Serhii Pimenov](https://github.com/olton)
+ [x] [Mina Node Monitor](https://github.com/olton/mina-node-monitor) by [Serhii Pimenov](https://github.com/olton)
+ [x] [Metro 4](https://github.com/olton/Metro-UI-CSS) by [Serhii Pimenov](https://github.com/olton)
+ [x] [ChartJS](https://github.com/olton/chartjs) by [Serhii Pimenov](https://github.com/olton)
+ [x] [SystemInformation](https://github.com/sebhildebrandt/systeminformation) by [Sebastian Hildebrandt](https://github.com/sebhildebrandt)
Expand Down Expand Up @@ -54,7 +54,7 @@ npm i
```json
{
"hosts": {
"node1": "192.168.1.2:3085"
"node1": "xxx.xxx.xxx.xxx:xxxxx"
},
"useHost": "node1",
"intervals": {
Expand All @@ -67,13 +67,14 @@ npm i
"cpu": 2000,
"uptime": 600000
},
"theme": "auto",
"useProxy": false,
"proxy": "https://server/proxy.php"
}
```

Секція `hosts` містить інформацію про сервери, на яких встановлена серверна частина Монітору.
Кожна адреса повинна визначати мережевий інтерфейс та його порт.
Кожна адреса повинна визначати мережевий інтерфейс/ip та його порт.
Параметр `useHost` визначає який сервер зі списку в секції` hosts` буде використовуватись.
Параметр `showIp` визначає показувати чи ні IP адресу в блоці ** Addresses ** (іноді не варто світити IP адресу).

Expand All @@ -91,6 +92,7 @@ npm i
- `mem` - інтервал оновлення інформації про завантаження оперативної пам'яті сервера
- `cpu` - інтервал оновлення інформації про завантаження CPU (s)
- `uptime` - interval for retrieve information about sidecar calculating server uptime
- `theme` - default `auto` (dark\light mode dependence from os), value can be `dark`, `light`

Section for using proxy (інформацію про проксі-сервер викладено нижче)
- `useProxy` - use or not proxy server
Expand All @@ -113,7 +115,11 @@ Section for using proxy (інформацію про проксі-сервер
"restartAfter": 30,
"restartCmd": "systemctl --user restart mina",
"host": "192.168.1.2:3085",
"graphql": "localhost:3085"
"graphql": "localhost:3085",
"https": {
"key": "",
"cert": ""
}
}
```

Expand All @@ -131,6 +137,7 @@ Section for using proxy (інформацію про проксі-сервер
- `canRestartNode` - Якщо значення цього ключа **true**, сервер може перезапустити вузол міни
- `restartAfter` - значення в хвилинах, якщо вузол синхронізований, але при цьому відстає по висоті блоків від Mina Explorer протягом зазначеного часу, вузол буде перезапущений
- `restartCmd` - Команда для перезапуска вузла Mina
- `https` - contains paths to cert and key to create https server

### Збірка клієнтського додатка

Expand Down
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</p>

# Mina Node Monitor
**Mina Node Monitor** is an extended graphical version of the` mina client status` command with additional indicators.
**Mina Monitor** is an extended graphical version of the` mina client status` command with additional indicators.
This is a `client-server` application for visual monitoring of the validator node and alerts when the node has a problem.

## Key Features
Expand All @@ -18,7 +18,7 @@ This is a `client-server` application for visual monitoring of the validator nod
- client - JavaScript, HTML, CSS

### Credits
+ [x] [Mina Node Monitor]() by [Serhii Pimenov](https://github.com/olton)
+ [x] [Mina Monitor](https://github.com/olton/mina-node-monitor) by [Serhii Pimenov](https://github.com/olton)
+ [x] [Metro 4](https://github.com/olton/Metro-UI-CSS) by [Serhii Pimenov](https://github.com/olton)
+ [x] [ChartJS](https://github.com/olton/chartjs) by [Serhii Pimenov](https://github.com/olton)
+ [x] [SystemInformation](https://github.com/sebhildebrandt/systeminformation) by [Sebastian Hildebrandt](https://github.com/sebhildebrandt)
Expand Down Expand Up @@ -52,7 +52,7 @@ Create file `config.json` in a `client` folder. Example below demonstrate witch
```json
{
"hosts": {
"node1": "192.168.1.2:3085"
"node1": "xxx.xxx.xxx.xxx:xxxx"
},
"useHost": "node1",
"intervals": {
Expand All @@ -65,13 +65,14 @@ Create file `config.json` in a `client` folder. Example below demonstrate witch
"cpu": 2000,
"uptime": 600000
},
"theme": "auto",
"useProxy": false,
"proxy": "https://server/proxy.php"
"proxy": "https://server/proxy.php",
}
```

Section `hosts` contain information about your servers addresses.
Each address must be an opened network interface on the mina node server.
Each address must be an opened network interface/ip and port on the mina node server.
Parameter `useHost` defines host where client retrieves data.

Section `intervals` contain information about intervals (in milliseconds), with which data will be retrieve.
Expand All @@ -84,11 +85,14 @@ Section `intervals` contain information about intervals (in milliseconds), with
- `mem` - interval for retrieve information about server memory
- `cpu` - interval for retrieve information about server CPU(s)
- `uptime` - interval for retrieve information about sidecar calculating server uptime
- `theme` - default `auto` (dark\light mode dependence from os), value can be `dark`, `light`

Section for using proxy (read about proxy below)
- `useProxy` - use or not proxy server
- `proxy` - proxy server address



#### Config file for server
Create file `config.json` in a `server` folder. Example below demonstrate witch data you must create.
```json
Expand All @@ -103,8 +107,12 @@ Create file `config.json` in a `server` folder. Example below demonstrate witch
"canRestartNode": true,
"restartAfter": 30,
"restartCmd": "systemctl --user restart mina",
"host": "192.168.1.2:3085",
"graphql": "localhost:3085"
"host": "xxx.xxx.xxx.xxx:xxxx",
"graphql": "xxx.xxx.xxx.xxx:xxxx",
"https": {
"key": "",
"cert": ""
}
}
```

Expand All @@ -118,10 +126,11 @@ where
- `alertInterval` - the interval with which the server will check node state and send alerts in telegrams
- `blockDiff` - difference in blocks with MinaExplorer at which an alert will be sent
- `host` - IP and PORT on which the server will run
- `graphql` - Mina node GraphQL address
- `graphql` - Mina node GraphQL address (by default `localhost:3085`)
- `canRestartNode` - if true, server can restart mina node
- `restartAfter` - value in minutes, if node synced and height is lower from Mina Explorer within the specified time, node will restart after this interval
- `restartCmd` - command for restart mina node
- `https` - contains paths to cert and key to create https server

### Build web client
To build client use command:
Expand Down
Loading

0 comments on commit 3625746

Please sign in to comment.