Skip to content

Commit af69650

Browse files
committed
Updating README documentation
1 parent 13b069d commit af69650

File tree

3 files changed

+96
-45
lines changed

3 files changed

+96
-45
lines changed

Cargo.lock

+61-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ serde_json = "1.0"
3232
# CLI & utilities
3333
clap = "4.2"
3434
reqwest = { version = "0.11", features = ["rustls-tls", "json"], default-features = false }
35-
chrono = "0.4"
35+
chrono = "0.4.26"
3636
ansi_term = "0.12"

README.md

+34-28
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,43 @@
11
# Network watchdog
22

3-
A minimalist & multi-region network monitoring tool written in Rust
3+
[![dependency status](https://deps.rs/repo/github/kongbytes/watchdog-rs/status.svg)](https://deps.rs/repo/github/kongbytes/watchdog-rs)
4+
5+
6+
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+
416

517
## Getting started
618

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.
20+
21+
```bash
22+
wget -O watchdog https://github.com/kongbytes/watchdog-rs/releases/download/v0.4.1/watchdog-rs-v0.4.1-x86_64-unknown-linux-musl && chmod +x ./watchdog
23+
```
24+
25+
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.
826

927
```yaml
1028
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
1430
groups:
1531
- name: default
16-
threshold: 4 # Amount of zone failures tolerted before alert
17-
mediums: telegram # Alert mediums
1832
tests:
19-
- http www.domain.be
33+
- http kongbytes.io
2034
```
2135
2236
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`.
2337

2438
```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
3141
3242
# Launch the main watchdog server on port 3030
3343
watchdog server --config ./config.yaml
@@ -40,10 +50,10 @@ In a region, launch a **network relay** : a service that will retrieve the monit
4050
# by the relay. In a production environment, this would
4151
# be defined in a systemd service.
4252
export WATCHDOG_ADDR=http://localhost:3030
43-
export WATCHDOG_TOKEN=x
53+
export WATCHDOG_TOKEN=your_secret_token
4454
4555
# Launch a watchdog network region relay
46-
watchdog relay --region eu-west
56+
watchdog relay --region local-network
4757
```
4858

4959
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 &
5262
# Put these environment variables in a safe place on your
5363
# workstation (watch out for shell history)
5464
WATCHDOG_ADDR=http://localhost:3030
55-
WATCHDOG_TOKEN=x
65+
WATCHDOG_TOKEN=your_secret_token
5666
5767
# Get the status of all your network regions & zones
5868
watchdog status
5969
```
6070

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-
6971
## Roadmap
7072

7173
Docs
@@ -81,10 +83,14 @@ Server
8183
- Bandwidth control for relays
8284

8385
Relay
84-
- Auto-detect config changes
86+
- ~~Auto-detect config changes~~
8587
- Add commands (TCP, UDP, ARP, ...)
8688
- Custom command (track UPS failure, ...)
87-
- Add metrics (HTTP latency, ...)
89+
- ~~Add metrics (HTTP latency, ...)~~
8890

8991
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

Comments
 (0)