inspect

module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: Apache-2.0

README

inspect is a collection of operating system/application monitoring analysis libraries and utilities with an emphasis on problem detection.

Installation

  1. get go
  2. go get -u -v github.com/square/inspect/...

The above commands should install three binaries in your original $GOPATH/bin directory.

  1. inspect
  2. inspect-mysql (work in progress)
  3. inspect-postgres (work in progress)

Please see subdirectories for more detailed documentation

Glossary

  • cmd - Directory for command line programs based on the below libraries
  • os - Operating system metric measurement libraries used by inspect.
  • mysql - MySQL metric reporting libraries.
  • postgres - Postgres metric reporting libraries.
  • metrics/metricscheck - Simple metrics libraries for golang.

Development

Development setup is a bit tricky given interaction of godep/gopath:

  • Create a fork
  • Setup golang workspace and set GOPATH Reference
    • export GOPATH=$HOME/godev # example
    • mkdir -p $GOPATH/{src,bin,pkg}
  • Setup project
    • mkdir -p $GOPATH/src/github.com/square
    • cd $GOPATH/src/github.com/square
    • git clone git@github.com:CHANGE-ME/inspect.git # change path to your fork
    • cd inspect
  • Setup a reference to upstream to sync changes with upstream easily etc
    • git remote add upstream github.com/square/inspect.git
[s@pain inspect (master)]$ git remote -v
origin	git@github.com:syamp/inspect.git (fetch)
origin	git@github.com:syamp/inspect.git (push)
upstream	github.com/square/inspect.git (fetch)
upstream	github.com/square/inspect.git (push)
  • We use godep for vendoring and dependency management. We rewrite import paths. If you are adding a new dependency or updating one, please run

    1. godep save -r
  • Please format, test and lint before submitting PRs

    1. go fmt ./...
    2. go test ./...
    3. $GOPATH/bin/golint ./...

Todo

  • metriccheck uses some darkmagic and uses golang/x/tools APIs which tend to break API compat often. Need to fix it.

Directories

Path Synopsis
cmd
This package implements a parser for configuration files.
This package implements a parser for configuration files.
mysql
qrt
os
cpustat
Package cpustat implements metrics collection related to CPU usage
Package cpustat implements metrics collection related to CPU usage
diskstat
Package diskstat implements metrics collection related to disk IO usage
Package diskstat implements metrics collection related to disk IO usage
entropystat
Package entropystat implements metrics collection for system entropy
Package entropystat implements metrics collection for system entropy
fsstat
Package fsstat implements metrics collection related to filesystem usage
Package fsstat implements metrics collection related to filesystem usage
interfacestat
Package interfacestat implements metrics Collection related to network interfaces
Package interfacestat implements metrics Collection related to network interfaces
loadstat
Package loadstat implements metrics collection related to loadavg
Package loadstat implements metrics collection related to loadavg
memstat
Package memstat implements metrics collection related to Memory usage
Package memstat implements metrics collection related to Memory usage
netstat
Package netstat implements metrics collection related to TCP and UDP
Package netstat implements metrics collection related to TCP and UDP
pidstat
Package pidstat implements metrics collection per-PID like memory/cpu
Package pidstat implements metrics collection per-PID like memory/cpu
uptimestat
Package uptimestat implements metrics collection related to loadavg
Package uptimestat implements metrics collection related to loadavg
postgres

Jump to

Keyboard shortcuts

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