Skip to content

Commit c4c2a26

Browse files
authored
Update documents for release v1.2.0 (#600)
* Update documents for VATZ release 1.2.0 * Update documents for VATZ release 1.2.0 - Typo revised. * Update community_plugins.md * Updated - installation.md - readme.md * Revert back to doc into sc for community_plugins
1 parent 48c100b commit c4c2a26

File tree

4 files changed

+123
-23
lines changed

4 files changed

+123
-23
lines changed

docs/community_plugins.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ Share your own plugins with everyone by adding to the list at [vatz-community-pl
44
Other contribution policies are available at [contribution guide](https://github.com/dsrvlabs/vatz/blob/main/docs/contributing.md).
55

66
<a href="https://github.com/dsrvlabs/vatz-community-plugins">
7-
<img alt="Qries" src="https://github.com/dsrvlabs/vatz/assets/6308023/22c1a2cd-8abb-4ce6-813b-c173704ac80e">
7+
<img alt="Qries" src="https://github.com/user-attachments/assets/337d4350-0648-4c8e-bfbc-ad0eba1376f6">
88
</a>

docs/design.md

+13
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ vatz_protocol_info:
4242
secret: "Put your Discord Webhook"
4343
- channel: "pagerduty"
4444
secret: "Put your PagerDuty's Integration Key (Events API v2)"
45+
- channel: "slack"
46+
secret: "Put Your Slack Webhook url"
47+
subscriptions:
48+
- "Please, put Plugin Name that you specifically subscribe to send notification."
4549
- channel: "telegram"
4650
secret: "Put Your Bot's Token"
4751
chat_id: "Put Your Chat's chat_id"
@@ -53,6 +57,15 @@ vatz_protocol_info:
5357
grpc_port: 19090
5458
http_port: 19091
5559
monitoring_info:
60+
gcp:
61+
gcp_cloud_logging_info:
62+
enabled: true
63+
cloud_logging_credential_info:
64+
project_id: "Please, Set your GCP Project id"
65+
credentials_type: "Check the Credential Type: ADC: Application, SAC: Default Credentials, Service Account Credentials, APIKey: API Key, OAuth: OAuth2"
66+
credentials: "Put your credential Info"
67+
checker_schedule:
68+
- "* * * * *"
5669
prometheus:
5770
enabled: true
5871
address: "127.0.0.1"

docs/installation.md

+108-22
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Please, check [latest version](https://github.com/dsrvlabs/vatz/releases) or che
99

1010

1111
## 1. VATZ
12-
### 1. Clone VATZ repository
12+
### 1.1. Clone VATZ repository
1313

1414
```
1515
$ git clone [email protected]:dsrvlabs/vatz.git
1616
```
1717

18-
### 2. Compile VATZ
18+
### 1.2. Compile VATZ
1919

2020
```
2121
$ cd vatz
@@ -24,7 +24,7 @@ Please, check [latest version](https://github.com/dsrvlabs/vatz/releases) or che
2424
You will see binary named `vatz`
2525

2626

27-
### 3. Initialize VATZ
27+
### 1.3. Initialize VATZ
2828
```
2929
$ ./vatz init
3030
```
@@ -37,7 +37,7 @@ You can also use `--all` flag to add all default setting of [official plugins](h
3737

3838
## 2. VATZ Plugin
3939

40-
### 1. Copy the plugin address
40+
### 2.1. Copy the plugin address
4141

4242
We officially provide 4 plugins for System Utility and 5 plugins for CosmosHub node.
4343
> **Official Plugin Repositories**
@@ -56,7 +56,7 @@ You can also use `--all` flag to add all default setting of [official plugins](h
5656
But you can easily develop custom plugins for the feature that you want with [VATZ SDK](https://github.com/dsrvlabs/vatz/tree/main/sdk). You could fine community provided plugins in [community_plugins.md](https://github.com/dsrvlabs/vatz/blob/main/docs/community_plugins.md). Feel free to add your custom plugins to community_plugins.md to share with others.
5757

5858

59-
### 2. Install the plugin
59+
### 2.2. Install the plugin
6060

6161
```
6262
$ ./vatz plugin install <plugin_address> <name>
@@ -68,7 +68,7 @@ For example,
6868
$ ./vatz plugin install https://github.com/dsrvlabs/vatz-plugin-sysutil/plugins/cpu_monitor cpu_monitor
6969
```
7070

71-
### 3. Check installation success
71+
### 2.3. Check installation success
7272

7373
```
7474
$ ./vatz plugin list
@@ -89,44 +89,56 @@ For example,
8989
```
9090
---
9191

92-
# Usage
93-
## 1. Modify default.yaml (VATZ)
94-
There's yaml file as config, and the default config must be updated by yourself to set up VATZ service and clients
92+
# 4. Set VATZ configs for your own use
93+
94+
## 4.1. Modify default.yaml (VATZ)
95+
There's a YAML file for configuration, and you'll need to update the default settings yourself to properly set up the VATZ service and clients.
9596
sample:
9697
> This is default.yaml, please update secrets, and etc for your node use.
9798
```
9899
vatz_protocol_info:
100+
home_path: "~/.vatz"
99101
protocol_identifier: "Put Your Protocol here"
100102
port: 9090
101103
health_checker_schedule:
102104
- "0 1 * * *"
103105
notification_info:
104106
host_name: "Put your machine's host name"
105107
default_reminder_schedule:
106-
- "*/15 * * * *"
108+
- "*/30 * * * *"
107109
dispatch_channels:
108110
- channel: "discord"
109111
secret: "Put your Discord Webhook"
110112
- channel: "pagerduty"
111113
secret: "Put your PagerDuty's Integration Key (Events API v2)"
114+
- channel: "slack"
115+
secret: "Put Your Slack Webhook url"
116+
subscriptions:
117+
- "Please, put Plugin Name that you specifically subscribe to send notification."
112118
- channel: "telegram"
113119
secret: "Put Your Bot's Token"
114120
chat_id: "Put Your Chat's chat_id"
115121
reminder_schedule:
116122
- "*/5 * * * *"
117-
118123
rpc_info:
119124
enabled: true
120125
address: "127.0.0.1"
121126
grpc_port: 19090
122127
http_port: 19091
123-
124128
monitoring_info:
129+
gcp:
130+
gcp_cloud_logging_info:
131+
enabled: true
132+
cloud_logging_credential_info:
133+
project_id: "Please, Set your GCP Project id"
134+
credentials_type: "Check the Credential Type: ADC: Application, SAC: Default Credentials, Service Account Credentials, APIKey: API Key, OAuth: OAuth2"
135+
credentials: "Put your credential Info"
136+
checker_schedule:
137+
- "* * * * *"
125138
prometheus:
126139
enabled: true
127140
address: "127.0.0.1"
128141
port: 18080
129-
130142
plugins_infos:
131143
default_verify_interval: 15
132144
default_execute_interval: 30
@@ -135,12 +147,19 @@ plugins_infos:
135147
- plugin_name: "samplePlugin1"
136148
plugin_address: "localhost"
137149
plugin_port: 9001
150+
executable_methods:
151+
- method_name: "sampleMethod1"
152+
- plugin_name: "samplePlugin2"
153+
plugin_address: "localhost"
138154
verify_interval: 7
139155
execute_interval: 9
156+
plugin_port: 10002
140157
executable_methods:
141-
- method_name: "sampleMethod1"
158+
- method_name: "sampleMethod2"
159+
142160
```
143-
### Update VATZ protocol Infos
161+
162+
### 4.1.1. update VATZ protocol Infos
144163

145164
1. `port`: Check your machine used port number. If you set it to a port number that is already in use, an error will occur.
146165
2. `health_checker_schedule`: Use cron expression to set the time to check if vatz is alive.
@@ -151,19 +170,41 @@ plugins_infos:
151170
5. `monitoring_info`: Check address and port to use monitoring. Currently, VATZ supports monitoring only through Prometheus-Grafana.
152171

153172

154-
## Update Monitoring info
173+
### 4.1.2. Update Monitoring info
155174

156-
## 1. Update Plugin Infos
175+
#### 1. GCP Integration
176+
> GCP: VATZ can be integrated with Google Cloud Platform (GCP) to send specific data, such as liveness information and plugin statuses, to Google Cloud Logging.
177+
- **``gcp``**
178+
- **`gcp_cloud_logging_info`**: Manages the integration of VATZ with GCP Cloud Logging.
179+
- **`enabled`**: Set to `true` or `false` to enable or disable this feature.
180+
- **`project_id`**: Specify your GCP `project_id` to enable the logging service.
181+
- **`credentials_type`**: Define the type of credentials used. Supported options:
182+
- 1. `ADC`: Application Default Credentials.
183+
- 2. `SAC`: Service Account Credentials.
184+
- 3. `APIKey`: API Key.
185+
- 4. `OAuth`: OAuth2.
186+
- **`credentials`**: Provide the path to your credentials or include the key directly. If a URL is provided, the credentials will be downloaded to memory, not stored on disk.
187+
- **`checker_schedule`**: Set the interval for periodic checks, in seconds.
188+
189+
#### 2. Prometheus Integration
190+
> VATZ can collect its own metrics using Prometheus which helps you to manage VATZ by Grafana.
191+
- **``prometheus``**
192+
- **`enabled`**: Set to `true` or `false` to enable or disable this feature.
193+
- **`address`**: Specify the address where Prometheus will run.
194+
- **`port`**: Define the port number for the Prometheus service.
195+
196+
197+
### 4.1.3. Update Plugin Infos
157198

158199
1. `plugin_name`: Refer to the plugin name you installed.
159200
2. `plugin_port`: Set your plugin used port number to connect the plugin.
160201
3. `verify_interval`: You can set the interval to check if the plugin is connected. The default interval is 15s.
161202
4. `execute_interval`: You can set the interval to execute the plugin method. The default interval is 30s.
162203

163204

164-
## 2. Start VATZ and VATZ Plugin
205+
## 5. Start VATZ service and VATZ Plugin service
165206

166-
### 1. Start VATZ plugin
207+
### 5.1. Start VATZ plugin
167208

168209
```
169210
$ ./vatz plugin start --plugin <name> --args <argumnets> --log <logfile>
@@ -185,12 +226,13 @@ plugins_infos:
185226
2024-01-17T01:01:32-06:00 INF Start plugin cpu_monitor module=plugin
186227
2024-01-17T01:01:32-06:00 INF Plugin cpu_monitor is successfully started. module=plugin
187228
```
188-
### 2. Start VATZ
229+
### 5.2. Start VATZ
189230

190231
```
191232
~$ ./vatz start
192233
```
193234
If you see following logs you successfully started VATZ service.
235+
194236
```
195237
~$ ./vatz start
196238
2024-01-17T01:01:38-06:00 INF Initialize Server module=main
@@ -204,9 +246,53 @@ plugins_infos:
204246
2024-01-17T01:01:46-06:00 INF Executor send request to cpu_monitor module=executor
205247
2024-01-17T01:01:46-06:00 INF response: SUCCESS module=executor
206248
```
249+
You can set your own path for config file such as
250+
```
251+
~$ ./vatz start --config <paht_to_your_own_file_at/config_file.yaml>
252+
```
207253

254+
### 5.3. Notification
255+
Alert notifications are sent to the configured channels when issues are detected in the monitored node. The specific alert conditions depend on each plugin.
208256

209-
### 3. Notification
210-
The alert notification will be sent to configured channels if there are problems in the monitored node. The alert conditions vary for each plugin.
257+
> Dispatcher channels can be configured to operate in two modes
258+
> - **Non-subscription mode**
259+
> - **Subscription-based mode**
260+
261+
Below are examples of both modes, along with the list of installed plugins:
262+
```
263+
 vatz plugin list
264+
+-------------------+------------+---------------------+-----------------------------------------------------------------+---------+
265+
| NAME | IS ENABLED | INSTALL DATE | REPOSITORY | VERSION |
266+
+-------------------+------------+---------------------+-----------------------------------------------------------------+---------+
267+
| cosmos_watcher | true | 2024-08-28 18:50:38 | github.com/dsrvlabs/vatz-plugin-watchers/plugins/watcher_cosmos | latest |
268+
| shentu_watcher | true | 2024-08-28 18:50:44 | github.com/dsrvlabs/vatz-plugin-watchers/plugins/watcher_cosmos | latest |
269+
| osmosis_watcher | true | 2024-08-28 18:50:44 | github.com/dsrvlabs/vatz-plugin-watchers/plugins/watcher_cosmos | latest |
270+
+-------------------+------------+---------------------+-----------------------------------------------------------------+---------+
271+
```
211272

212273

274+
1. **Non-subscription mode**: In this mode, notifications are automatically delivered from any declared plugin that meets its own alert conditions. All registered dispatcher channels will send alert messages from all plugins.
275+
```
276+
dispatch_channels:
277+
- channel: "discord"
278+
secret: "https://discord.com/api/webhooks/221449818154281/7PfPpuWv4uK4wkPp-uWT1nJalAesD0YgSZA2j2EL7YvAN1ah32"
279+
subscriptions:
280+
- channel: "pagerduty"
281+
secret: "y_NbAkKc66ryYTWUX4YEu801s"
282+
```
283+
In this mode, there is no need to set any specific subscriptions. If any plugin’s alert conditions are met, the alert messages will be sent to both Discord and PagerDuty.
284+
285+
2. **Subscription-based mode**: This mode allows you to subscribe to specific plugins, ensuring that you receive notifications only from those you select. In this case, only alert messages from your subscribed plugins will be delivered through the dispatcher channel.
286+
```
287+
dispatch_channels:
288+
- channel: "discord"
289+
secret: "https://discord.com/api/webhooks/221449818154281/7PfPpuWv4uK4wkPp-uWT1nJalAesD0YgSZA2j2EL7YvAN1ah32"
290+
subscriptions:
291+
- channel: "pagerduty"
292+
secret: "y_NbAkKc66ryYTWUX4YEu801s"
293+
subscriptions:
294+
- "cosmos_watcher"
295+
- "shentu_watcher"
296+
```
297+
In the example above, only alert messages from the `cosmos_watcher` and `shentu_watcher` plugins will be sent to PagerDuty. Alerts from the `osmosis_watcher` plugin will be ignored for Pagerduty channel.
298+

script/simple_start_guide/readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ bash install_vatz&official-plugins.sh
1313
```
1414

1515
### 3. default_config.yaml
16+
> Please, refer to [installation guide](../../docs/installation.md) for more detailed configs.
1617
- Replace default.yaml with this file after execute `install_vatz&official-plugins.sh`.
1718
- You must enter hostname and webhook or add more dispatchers such as telegram, pagerduty
1819
- Change the port if necessary.

0 commit comments

Comments
 (0)