ping-out-check

command module
v0.0.0-...-0ca7422 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 5 Imported by: 0

README

ping-out-check

About:

Pinging the other side of wireguard tunnel that connects from home assistant to the main location. If the other side is not reachable, write something to a file which home assistant is watching. Later automation will pick-up that the file has changed and will restart the wireguard client.

Synopsis:

> .\ping-out-check.exe -h 

ping-out-check - pings the target host and determines if it's reachable based on the amount of packet loss. Can write specific message to a file if provided or prints the message to standard output.

Special thanks to Prometheus Community for maintaining pro-bing - https://github.com/prometheus-community/pro-bing

Usage:
    ping [--count] [--interval] [--timeout] [--ttl] [--size] [--privileged] [--message-positive] [--message-negative] [--skip-p] [--skip-n] [--filepath] [--stdout] [--packet-loss-ts] host
Examples:
        TBD
  -count int
        number of echo requests to send (default -1)
  -filepath string
        filepath used while writing the file
  -interval duration
        interval betweeen each echo request (default 1s)
  -message-negative string
        message to use in output when host is considered unreachable (default "Host unreachable")
  -message-positive string
        message to use in output when host is considered reachable (default "Host reachable")
  -packet-loss-ts float
        consider target host as unreachable after losing certain percentage of packets (default 50)
  -privileged
        send a privileged raw ICMP ping
  -size int
        send ICMP messages with certain payload (default 24)
  -skip-n
        Skips writing the unreachable message to output (either stdout or to filepath)
  -skip-p
        Skips writing the reachable message to output (either stdout or to filepath)
  -stdout
        if set to true, writes message to stdout instead of writing to file given in filepath
  -timeout duration
        ping for that amount of time (default 30s)
  -ttl int
        TTL (default 64)

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