online-watch

command module
v0.0.0-...-3fea41a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2024 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Online Watch

Monitors targets for packetloss using TCP and ICMP(v6). Designed to be run inside DCs to track durations of packet-loss during maintenance.

Usage: online-watch [-p|--port=<port>] [--no-tcp] [--no-icmp] [--verbose] [--interval=<ms>] [--timeout=<ms>] TARGETS...

Monitors targets for packetloss using TCP and ICMP(v6).

Arguments:
  TARGETS          [label=]<IPv4|IPv6>[:port]

Options:
  -p, --port       Disable TCP checks (default 22)
      --no-tcp     Disable TCP checks
      --no-icmp    Disable ICMP checks
      --verbose    Log all results
      --interval   Time between checks (ms) (default 250)
      --timeout    TCP/ICMP timeout (ms) (default 250)

Output

To watch 10.0.0.1 for TCP/22 and ICMP, only showing output during outages:

$ online-watch 10.0.0.1
2024-05-11 08:55:54.132 10.0.0.1 ICMP ✔︎ TCP/22 ✖︎ for 0s (1x)
2024-05-11 08:55:54.378 10.0.0.1 ICMP ✔︎ TCP/22 ✖︎ for 246ms (2x)
2024-05-11 08:55:54.628 10.0.0.1 ICMP ✔︎ TCP/22 ✖︎ for 497ms (3x)
2024-05-11 08:55:54.882 10.0.0.1 ICMP ✔︎ TCP/22 ✖︎ for 750ms (4x)
2024-05-11 08:55:55.137 10.0.0.1 ICMP ✔︎ TCP/22 ✖︎ for 1.005s (5x)
2024-05-11 08:55:55.382 10.0.0.1 ICMP ✔︎ TCP/22 ✖︎ for 1.251s (6x)
2024-05-11 08:55:55.634 10.0.0.1 ICMP ✔︎ TCP/22 ✖︎ for 1.503s (7x)
2024-05-11 08:55:55.878 10.0.0.1 ICMP ✔︎ TCP/22 ✖︎ for 1.747s (8x)
2024-05-11 08:55:56.136 10.0.0.1 ICMP ✔︎ TCP/22 ✖︎ for 2.004s (9x)
^C
- Longest outage 10.0.0.1: 2.004s (9x)

Installation

go install github.com/href/online-watch@latest

Examples

To check multiple IPs concurrently:

online-watch 10.0.0.1 10.0.0.2

To attach labels to each IP for more helpful output:

online-watch rack-a=10.0.0.1 rack-b=10.0.0.2

To use a different default port:

online-watch -p 80 web-a=10.0.0.1 web-b=10.0.0.2

To use a separate port per target:

online-watch frontend=10.0.0.1:443 backend=10.0.0.2:5432

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址