All Projects β†’ rs β†’ Jaggr

rs / Jaggr

Licence: mit
JSON Aggregation CLI

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Jaggr

Jplot
iTerm2 expvar/JSON monitoring tool
Stars: ✭ 949 (+160%)
Mutual labels:  cli, json, monitoring
Httpie
As easy as /aitch-tee-tee-pie/ πŸ₯§ Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+14434.79%)
Mutual labels:  cli, json
Csv Parser
A modern C++ library for reading, writing, and analyzing CSV (and similar) files.
Stars: ✭ 359 (-1.64%)
Mutual labels:  json, statistics
Wallace Cli
Pretty CSS analytics on the CLI
Stars: ✭ 281 (-23.01%)
Mutual labels:  cli, statistics
Octosql
OctoSQL is a query tool that allows you to join, analyse and transform data from multiple databases and file formats using SQL.
Stars: ✭ 2,579 (+606.58%)
Mutual labels:  cli, json
S Tui
Terminal-based CPU stress and monitoring utility
Stars: ✭ 2,825 (+673.97%)
Mutual labels:  cli, monitoring
Supervizer
NodeJS Application Manager
Stars: ✭ 278 (-23.84%)
Mutual labels:  cli, monitoring
Contentful Cli
The official Contentful command line interface. Use Contentful features straight from the command line!
Stars: ✭ 200 (-45.21%)
Mutual labels:  cli, json
Tmuxp
πŸ’» tmux session manager. built on libtmux
Stars: ✭ 3,269 (+795.62%)
Mutual labels:  cli, json
Longview
Linode Longview Agent
Stars: ✭ 319 (-12.6%)
Mutual labels:  statistics, monitoring
Vudash
Powerful, Flexible, Open Source dashboards for anything
Stars: ✭ 363 (-0.55%)
Mutual labels:  statistics, monitoring
Json 2 Csv
Convert JSON to CSV *or* CSV to JSON!
Stars: ✭ 210 (-42.47%)
Mutual labels:  cli, json
Jsonexport
{} β†’ πŸ“„ it's easy to convert JSON to CSV
Stars: ✭ 208 (-43.01%)
Mutual labels:  cli, json
Cli
A simple, fast, and fun package for building command line apps in Go
Stars: ✭ 16,995 (+4556.16%)
Mutual labels:  cli, json
Rts
RTS: request to struct. Generates Go structs from JSON server responses.
Stars: ✭ 206 (-43.56%)
Mutual labels:  cli, json
Sqawk
Like Awk but with SQL and table joins
Stars: ✭ 263 (-27.95%)
Mutual labels:  cli, json
Jwt Cli
A super fast CLI tool to decode and encode JWTs built in Rust
Stars: ✭ 336 (-7.95%)
Mutual labels:  cli, json
Jl
jl β€” JSON Logs, a development tool for working with structured JSON logging.
Stars: ✭ 194 (-46.85%)
Mutual labels:  cli, json
Scc
Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go
Stars: ✭ 2,943 (+706.3%)
Mutual labels:  cli, statistics
Ig Monitoring
🚨 DISCONTINUED🚨 IGMonitoring - Free, self hosted Instagram Analytics and Stats
Stars: ✭ 283 (-22.47%)
Mutual labels:  statistics, monitoring

jaggr: JSON Aggregation CLI

license Build Status

Jaggr is a command line tool to aggregate in real time a series of JSON logs. The main goal of this tool is to prepare data for plotting with jplot.

Install

Direct downloads are available through the releases page.

Using homebrew on macOS (Go not required):

brew install rs/tap/jaggr

From source:

go get -u github.com/rs/jaggr

Usage

Given the input below, generate one line per second with mean, min, max:

{"code": 200, "latency": 4788000, "error": ""}
{"code": 200, "latency": 5785000, "error": ""}
{"code": 200, "latency": 4162000, "error": ""}
{"code": 502, "latency": 4461000, "error": "i/o error"}
{"code": 200, "latency": 5884000, "error": ""}
{"code": 200, "latency": 4702000, "error": ""}
...
tail -f log.json | jaggr @count=rps hist[200,300,400,500]:code min,max,mean:latency

Output will be on line per second as follow:

{"rps":123, "code": {"hist": {"200": 100, "300": 0, "400": 0, "500": 13}}, "latency":{"min": 4461000, "max": 5884000, "mean": 4483000}}

So here we give a stream of real-time requests to jaggr standard input and request the aggregation of the code and latency fields. For the code we request an histogram with some known error codes with an "other" bucket defined by *. The latency field is aggregated using minimum, maximum and mean. In addition, @count adds an extra field indicating the total number of lines aggregated. The = sign can be used on any field to rename it, here we use it to say that the count is an rps as we are using the default aggregation time of 1 second.

Note that any field not specified in the argument list are removed from the output (i.e. error field).

Field Syntax

A fields are JSON path prefixed with a list of aggregators. You can rename a field by suffixing it with =<name>. Here are some example of valid field declarations:

  • median:latency: Median computed for the latency field.
  • median:latency=lat: Same as above but the field is renamed lat.
  • min,max,mean:latency: Several aggregators applied to the latency field.
  • median:timing.latency=latency: Median of the sub-field latency of the timing JSON object renamed as top level latency.
  • [100,200,300,400,500]hist:code: Code counted into bucket of 100s.

Aggregators

Available aggregators:

  • min, max, mean: Computes the min, max, mean of the field's values during the sample interval.
  • median, p#: The p1 to p99 compute the percentile of the field's values during the sample interval.
  • sum: Sum all values for the field.
  • [bucket1,bucketN]hist: Count number of values between bucket and bucket+1.
  • [bucket1,bucketN]cat: Count number of values equal to the define buckets (can be non-number values). The special * matches values that fit in none of the defined buckets.

Recipes

Vegeta

Jaggr can be used to integrate vegeta with jplot as follow:

echo 'GET http://localhost:8080' | \
    vegeta attack -rate 5000 -duration 10m | vegeta dump | \
    jaggr @count=rps \
          hist\[100,200,300,400,500\]:code \
          p25,p50,p95:latency \
          sum:bytes_in \
          sum:bytes_out | \
    jplot rps+code.hist.100+code.hist.200+code.hist.300+code.hist.400+code.hist.500 \
          latency.p95+latency.p50+latency.p25 \
          bytes_in.sum+bytes_out.sum

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].