The Cross-Platform Proxyless Command Line UI for StatsD Metrics
The statstee
utility collects and plots metrics emitted from other processes on a host without interrupting or proxying their flow to the StatsD daemon or subsequent backend services.
statstee
relies on libpcap (WinPcap for Windows) to capture the UDP metric datagrams off the network. Values are bucketed in one-second intervals and plots are shown depending on the metric datatype. Current and moving averages are also provided for each graph.
- Cross-Platform (OSX / Linux / Windows)
- Proxyless capture mode (daemon and processes can still use default host/port)
- Listener mode if no daemon is present (prevents packet loss)
- Configurable with sensible defaults (loopback interface, port 8125)
- Supports all StatsD metric data-types (gauge, counter, set, timing)
- Supports DataDog histogram metrics (treated like standard StatsD timing)
- Graphed time-series for each metric type
- Current value with 1-, 5- & 10-minute moving averages (EWMA)
- Filter/search support
- Sample rate support
- DataDog events and service checks
- Save and/or replay metric data
- Current Value
- Count / RPS
- Cumulative Count
- Unique Count / Unique RPS
- Percent Unique
- Count / RPS
- Median
- 75th Percentile
- 95th Percentile
Static binaries for many major platforms are forthcoming. For now, please refer to the development section for installation instructions.
→ statstee -h
Usage of dist/statstee:
-c bool
force capture mode, even if StatsD is not present
-d string
network device to capture on (default "_first_loopback_")
-l bool
force listen mode, error if the port cannot be bound
-p int
port to capture on (default 8125)
-v bool
display debug output to statstee.log
NB: You will likely need to run statstee
as root or with sudo
in order to snoop on the network traffic.
Requires Go 1.14 or Higher
- OSX:
brew install libpcap
- Ubuntu/Debian:
apt-get install libpcap-dev
- Windows: run installer
go get github.com/rodaine/statstee
script/test
script/build
dist/statstee -v
- This app, with logging to./statstee.log
!dist/statter
- Demo app for experimenting (outputs all metric types)dist/jerks -n 1 -r 1000
- Load testing app (n
metrics atr
rps)
The MIT License (MIT)
Copyright (c) 2016 Chris Roche
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.