Skip to content

Commit 86421d6

Browse files
committed
docs: README & LICENSE
1 parent 2a0fd30 commit 86421d6

File tree

2 files changed

+67
-1
lines changed

2 files changed

+67
-1
lines changed

LICECNSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 DH Tech
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,48 @@
1-
**Observer** is a tool that runs on blackbox probes in our network to e2e test our services.
1+
# observer
22

3+
A lightweight network observer written in Go that monitors network interfaces, performs ICMP and DNS health checks, and exposes Prometheus metrics.
34

5+
## features
6+
7+
- Periodically samples DHCPv4 and DHCPv6 addresses on a specified interface.
8+
- Performs ICMP pings to one or more target hosts.
9+
- Performs DNS health checks for specified DNS servers and query names.
10+
- Dynamically adds and removes IP addresses on the interface during checks.
11+
- Exposes Prometheus metrics via an HTTP endpoint.
12+
- Supports toggling IPv4 or IPv6 monitoring independently.
13+
- Verbose logging for debugging and operational insight.
14+
15+
## installation
16+
17+
```bash
18+
git clone <repo-url>
19+
cd observer
20+
go build .
21+
./observer
22+
```
23+
24+
## configuration
25+
26+
| Flag | Default | Description |
27+
|------|---------|-------------|
28+
| `-interface` | `""` | Network interface to operate on |
29+
| `-icmp-targets` | `""` | Comma-separated list of ICMP targets |
30+
| `-icmp-count` | `3` | Number of ICMP packets to send per target |
31+
| `-interval` | `5s` | Interval for collecting Prometheus metrics |
32+
| `-verbose` | `false` | Enable verbose logging |
33+
| `-disable4` | `false` | Disable all IPv4 client behavior (DHCPv4 & ICMPv4) |
34+
| `-disable6` | `false` | Disable all IPv6 client behavior (DHCPv6 & ICMPv6) |
35+
| `-qname` | `healthcheck.event.dreamhack.se.` | DNS health check query name |
36+
| `-dns` | `""` | Comma-separated DNS servers to probe |
37+
| `-host-port` | `9023` | HTTP port to serve Prometheus metrics |
38+
39+
example:
40+
```bash
41+
./observer \
42+
-interface eth0 \
43+
-icmp-targets 8.8.8.8,1.1.1.1 \
44+
-icmp-count 5 \
45+
-dns 8.8.8.8,1.1.1.1 \
46+
-interval 10s \
47+
-verbose
48+
```

0 commit comments

Comments
 (0)