You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A minimalist & multi-region network monitoring tool written in Rust. Monitor network failures with custom tests and multiple alerting modes (Telegram, SMS, ...)
7
+
8
+
## Project goals
9
+
10
+
-**All-in-one solution** : the project can be used to push metrics from network regions, aggregate all metrics in a server and see the results with a CLI
11
+
-**Minimal footprint** : the major open-source monitoring solutions such as Prometheus and Zabbix offer a wide range of features, but consume a lot of resources (memory, network, ...). This project provides a set of components that are designed for low-resource consumption.
12
+
-**Default "push" approach** : to enable multi-region network monitoring, the server defaults to a "push" approach. No need to have a fixed IP address or configure NAT in your router : all data is sent from the regions to the main public server.
13
+
-**Grafana-ready** : while the project provides a CLI to view the status of your regions and track incidents, the project also integrates with Grafana.
14
+
-**Configuration as code** : easily backup your configuration, keep track of changes with Git and share with other teams.
15
+
4
16
5
17
## Getting started
6
18
7
-
Start by retrieving the latest release of the `watchdog-rs` project and create a YAML configuration `config.yaml` file as shown below. This **configuration file** will be used by the monitoring server to manage your configuration accross regions.
19
+
Download the `watchdog` binary for Linux (Ubuntu, Fedora, Debian, ...). See the [releases page](https://github.com/kongbytes/watchdog-rs/releases) for other binaries.
Create a YAML configuration `config.yaml` file as shown below. This **configuration file** will be used by the monitoring server to manage your configuration accross regions.
8
26
9
27
```yaml
10
28
regions:
11
-
- name: eu-west
12
-
interval: 5s# Interval between network checks in a region
13
-
threshold: 3# Amount of region failures tolerated before alert
29
+
- name: local-network
14
30
groups:
15
31
- name: default
16
-
threshold: 4# Amount of zone failures tolerted before alert
17
-
mediums: telegram # Alert mediums
18
32
tests:
19
-
- http www.domain.be
33
+
- http kongbytes.io
20
34
```
21
35
22
36
Launch the main **monitoring server** that will be used by network regions to collect metrics. This service should be reachable by all network regions on port `3030`.
23
37
24
38
```bash
25
-
# Define a set of environment variables that will be used
26
-
# by the server. In a production environment, this would
27
-
# be defined in a systemd service.
28
-
export TELEGRAM_TOKEN=x
29
-
export TELEGRAM_CHAT=x
30
-
export WATCHDOG_TOKEN=x
39
+
# Define a set of environment variables that will be used by the server
40
+
export WATCHDOG_TOKEN=your_secret_token
31
41
32
42
# Launch the main watchdog server on port 3030
33
43
watchdog server --config ./config.yaml
@@ -40,10 +50,10 @@ In a region, launch a **network relay** : a service that will retrieve the monit
40
50
# by the relay. In a production environment, this would
41
51
# be defined in a systemd service.
42
52
export WATCHDOG_ADDR=http://localhost:3030
43
-
export WATCHDOG_TOKEN=x
53
+
export WATCHDOG_TOKEN=your_secret_token
44
54
45
55
# Launch a watchdog network region relay
46
-
watchdog relay --region eu-west
56
+
watchdog relay --region local-network
47
57
```
48
58
49
59
On your workstation, use the **CLI** to get details about the monitoring state & ongoing incidents.
@@ -52,20 +62,12 @@ On your workstation, use the **CLI** to get details about the monitoring state &
52
62
# Put these environment variables in a safe place on your
53
63
# workstation (watch out for shell history)
54
64
WATCHDOG_ADDR=http://localhost:3030
55
-
WATCHDOG_TOKEN=x
65
+
WATCHDOG_TOKEN=your_secret_token
56
66
57
67
# Get the status of all your network regions & zones
58
68
watchdog status
59
69
```
60
70
61
-
## Project goals
62
-
63
-
- **All-in-one solution** : the project can be used to push metrics from network regions, aggregate all metrics in a server and see the results with a CLI
64
-
- **Minimal footprint** : the major open-source monitoring solutions such as Prometheus and Zabbix offer a wide range of features, but consume a lot of resources (memory, network, ...). This project provides a set of components that are designed for low-resource consumption.
65
-
- **Default "push" approach** : to enable multi-region network monitoring, the server defaults to a "push" approach. No need to have a fixed IP address or configure NAT in your router : all data is sent from the regions to the main public server.
66
-
- **Grafana-ready** : while the project provides a CLI to view the status of your regions and track incidents, the project also integrates with Grafana.
67
-
- **Configuration as code** : easily backup your configuration, keep track of changes with Git and share with other teams.
68
-
69
71
## Roadmap
70
72
71
73
Docs
@@ -81,10 +83,14 @@ Server
81
83
- Bandwidth control for relays
82
84
83
85
Relay
84
-
- Auto-detect config changes
86
+
- ~~Auto-detect config changes~~
85
87
- Add commands (TCP, UDP, ARP, ...)
86
88
- Custom command (track UPS failure, ...)
87
-
- Add metrics (HTTP latency, ...)
89
+
- ~~Add metrics (HTTP latency, ...)~~
88
90
89
91
Docs & more
90
-
- Real-life scenarios (Raspberry, ...)
92
+
- Real-life scenarios (Raspberry, ...)
93
+
94
+
## Contributing
95
+
96
+
Feel free to suggest an improvement, report a bug, or ask something: https://github.com/kongbytes/watchdog-rs/issues
0 commit comments