qma

Crates.ioqma
lib.rsqma
version0.1.1
sourcesrc
created_at2022-05-29 13:24:36.233003
updated_at2022-06-05 10:33:10.579353
descriptionSimple command line tool for aggregate structured log.
homepage
repository
max_upload_size
id596520
size35,860
(toritoritori29)

documentation

README

QMA

Simple command line tool for aggeregate structured log.

Usage

Before runnning qma, prepare the yaml file which describe table definition config like below. See here to detail.

Query from log file.

qma <CONFIG_PATH> <LOG_FILE_PATH>

Query from stdout

SOME COMMAND | qma <CONFIG_PATH>

Installation

You need either cargo to install qma.

Using cargo

cargo install qma

Using homebrew (only for OSX)

Config file details.

// global setting
order_by: count
order_desc: asc //
// index = group key settings
index:
    name: method  // Column name on output table.
    accessor: httpRequest.requestMethod  // Json accessor

// fields: Columns list. See `Field setting details` section for details.
fields:
  - name: latency  // Column table on output table.
    accessor: httpRequest.latency.  // Json accessor for target data.
    dtype: second  // data type.
    operation: average // Aggregation method.
  - name: method
    accessor: httpRequest.requestMethod
    dtype: string
    operation: count

[1] Field setting details.

name: The field name to be displayed in the output table. accessor:

Commit count: 0

cargo fmt