gomo

command module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

GoMo

Tmobile trashcan datalogging for the original trashcan.

If you know, you know.

Usage

 $ ./gomo --help
Fetch and log trashcan data to a long term data store for analyzing

Usage:
  gomo [command]

Available Commands:
  align       Continuously fetch data and display timeseries CLI charts
  completion  Generate the autocompletion script for the specified shell
  daemon      Daemonized Gomo which will continuously run
  help        Help about any command
  show        Do a single fetch and display
  version     retrieve version and build info for gomo

Flags:
      --config string     config file (default is $HOME/.gomo.yaml)
  -h, --help              help for gomo
  -u, --hostname string   hostname of your tmobile trashcan (default "http://192.168.12.1")
  -p, --targets strings   List of hostnames to target with ping test (default [www.google.com,github.com])
  -s, --timeout int       timeout in seconds for outbound requests (default 15)
  -t, --toggle            Help message for toggle
  -w, --workers int       number of workers for pingers (default 2)

Use "gomo [command] --help" for more information about a command.

Quick Run

The quick run mode is accessible via the show command, and does a single pass and returns current values along with the results of a ping test.

$ gomo show --help
Do a single fetch and display.

Usage:
  gomo show [flags]

Flags:
  -h, --help     help for show
      --pretty   Print a prettified table layout instead of raw data

Global Flags:
      --config string     config file (default is $HOME/.gomo.yaml)
  -u, --hostname string   hostname of your tmobile trashcan (default "http://192.168.12.1")
  -p, --targets strings   List of hostnames to target with ping test (default [www.google.com,github.com])
  -s, --timeout int       timeout in seconds for outbound requests (default 15)
  -w, --workers int       number of workers for pingers (default 2)
=== Gomo 433a10b =======================
Online: 1
IPV6: redacted
Bytes Recv: 39627435316 (39.63GB)
Bytes Sent: 8446933064 (8.45GB)
=== 5G =================================
  Band:                n41
  CellID:              redacted

  SNR:                   6
  RSRP:               -102
  RSRQ:                -12
=== LTE ================================
  Band:                B66
  CellID:              redacted

  SNR:                   1
  RSRP:               -104
  RSRQ:                -16
  RSSI:                -69
=== Ethernet ===========================
  Enabled:               1
  Status:               Up

  Bytes Recv:4293117872 (4.29GB)
  Bytes Sent:4293117872 (4.29GB)

Alignment

Alignment mode, accessible via align shows a continuous time series graph of LTE and 5G metrics to help align an antenna.

$ gomo align --help
Continuously fetch data and display timeseries CLI charts.
Useful for aligning antennas.

Usage:
  gomo align [flags]

Flags:
  -h, --help       help for align
  -x, --poll int   How often to fetch data and redraw (default 1)
  -z, --silent     Silence cell ID for screenshots (avoid leaking location data unintentionally)

Global Flags:
      --config string     config file (default is $HOME/.gomo.yaml)
  -u, --hostname string   hostname of your tmobile trashcan (default "http://192.168.12.1")
  -p, --targets strings   List of hostnames to target with ping test (default [www.google.com,github.com])
  -s, --timeout int       timeout in seconds for outbound requests (default 15)
  -w, --workers int       number of workers for pingers (default 2)

Alignment

Daemon datalogging

Daemon mode, accessible via daemon is a background process - meant to be run by a systemd unit. This continuously scrapes data from the trashcan and surfaces it on a /metrics endpoint for prometheus to scrape.

There is a rough prometheus/grafana setup configured with a dashboard meant for this data

$ gomo daemon --help
Daemonized Gomo which will continuously run and insert
discovered metrics into prometheus time series for graphing and
historical analysis.

Usage:
  gomo daemon [flags]

Flags:
  -h, --help       help for daemon
  -m, --port int   Port to bind metrics webserver to (default 2112)

Global Flags:
      --config string     config file (default is $HOME/.gomo.yaml)
  -u, --hostname string   hostname of your tmobile trashcan (default "http://192.168.12.1")
  -p, --targets strings   List of hostnames to target with ping test (default [www.google.com,github.com])
  -s, --timeout int       timeout in seconds for outbound requests (default 15)
  -w, --workers int       number of workers for pingers (default 2)

Grafana

TODO

High Priority

  • Stub trashcan for tests with a fake json response
  • Write tests

Low Priority

  • Tighten up prometheus/grafana deployment
  • Docker container for gomo in docker-compose for quick launch
  • Add internet speedtest metrics exporter
  • Add ping metrics exporter
  • Explore other cgi pages for more potential data points or metrics

Dependencies

Authors

  • Charles Corbett <github.com/asciifaceman>

Thanks

  • Karl Q

Documentation

Overview

Copyright © 2023 Charles Corbett <github.com/asciifaceman>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
pkg
status
package status provides a few network status checks like ping and DNS queries to infer if it is reasonably healthy
package status provides a few network status checks like ping and DNS queries to infer if it is reasonably healthy
tmo

Jump to

Keyboard shortcuts

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