This instruction is mainly based on Linux:Ubuntu
Install Go
You can skip this part if you already have installed go version > 1.18 on your system.
Please, check latest version or check on VATZ module and follow these instructions to install.
-
Clone VATZ repository
$ git clone [email protected]:dsrvlabs/vatz.git
-
Compile VATZ
$ cd vatz $ make
You will see binary named
vatz
-
Initialize VATZ
$ ./vatz init
You will see config file named default.yaml once you initialize VATZ.
- Copy the plugin address
Plugin Repositories
- vatz-plugin-sysutill
- cpu_monitor
- disk_monitor
- mem_monitor
- vztz-plugin-cosmoshub
- node_active_status
- node_block_sync
- node_governance_alarm
- node-is_alived
- node_peer_count
We officially provide 3 plugins for System Utility and 5 plugins for CosmosHub node. But you can easily develop custom plugins for the feature that you want with VATZ SDK.
- Install the plugin
$ ./vatz plugin install <plugin_address> <name>
Put git address of the plugin you want to install. You can set the plugin name as desired.
For example,
$ ./vatz plugin install https://github.com/dsrvlabs/vatz-plugin-sysutil/plugins/cpu_monitor cpu_monitor
- Check installation success
$ ./vatz plugin list
Verify that the plugin is installed successfully by checking whether the plugin name is added to the list.
There's yaml file as config, and the default config must be updated by yourself to set up VATZ service and clients sample:
This is default.yaml, please update secrets, and etc for your node use.
vatz_protocol_info:
protocol_identifier: "Put Your Protocol here"
port: 9090
health_checker_schedule:
- "0 1 * * *"
notification_info:
host_name: "Put your machine's host name"
default_reminder_schedule:
- "*/15 * * * *"
dispatch_channels:
- channel: "discord"
secret: "Put your Discord Webhook"
- channel: "pagerduty"
secret: "Put your PagerDuty's Integration Key (Events API v2)"
- channel: "telegram"
secret: "Put Your Bot's Token"
chat_id: "Put Your Chat's chat_id"
reminder_schedule:
- "*/5 * * * *"
rpc_info:
enabled: true
address: "127.0.0.1"
grpc_port: 19090
http_port: 19091
plugins_infos:
default_verify_interval: 15
default_execute_interval: 30
default_plugin_name: "vatz-plugin"
plugins:
- plugin_name: "samplePlugin1"
plugin_address: "localhost"
plugin_port: 9001
verify_interval: 7
execute_interval: 9
executable_methods:
- method_name: "sampleMethod1"
port
: check your machine used port number. If you set it to a port number that is already in use, an error will occur.health_checker_schedule
: Use cron expression to set the time to check if vatz is alive.dispatch_channels
: Add infos to receive alerts through discord, pagerduty, and telegram.reminder_schedule
: Use cron expression to set the time to resend the alert if it is not confirmed.
plugin_name
: Refer to the plugin name you installed.plugin_port
: Set your plugin used port number to connect the plugin.verify_interval
: You can set the interval to check if the plugin is connected. The default interval is 15s.execute_interval
: You can set the interval to execute the plugin method. The default interval is 30s.
-
Start VATZ
$ ./vatz start
If you see following logs you successfully started VATZ service.
root@validator-node:~/vatz# go run main.go 2022/04/22 05:06:54 Initialize Servers: VATZ Manager 2022/04/22 05:06:54 Listening Port :9090 2022/04/22 05:06:54 Node Manager Started
-
Start VATZ plugin
$ ./vatz plugin start <name>
Put the plugin name you want to start. You can search installed plugins with CLI command.
For example,
$ ./vatz plugin start cpu_monitor
If you see the following commands, you successfully started VATZ plugin.
2022-09-14T08:17:33+02:00 INF Register module=grpc 2022-09-14T08:17:33+02:00 INF Start 127.0.0.1 9094 module=sdk 2022-09-14T08:17:33+02:00 INF Start module=grpc 2022-09-14T08:17:48+02:00 INF Execute module=grpc
-
The alert notification will be sent to configured channels if there are problems in the monitored node. The alert conditions vary for each plugin.