ltsv-tailer

module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0

README

GitHub test Go Report Card Go Doc

ltsv-tailer

ltsv-tailer is the exporter for Prometheus that reads LTSV files like tail -F and exports metrics by given metrics configuration.

How to run the example

./example/logger -o tailme -i 1 &

./ltsv-tailer -metrics example/metrics.yml -file tailme -logtostderr &

curl http://127.0.0.1:9588/metrics

Metrics Configuration

Example metrics configuration:

transform:
  tolower:
    - method
  # transform resptime in microsec into second
  #tosec:
  #  - resptime: microsec
metrics:
  - name: ltsv_http_request_count_total
    kind: counter
    value_key: COUNTER
    help: http request count total
    labels:
      - vhost
      - method
      - code
  - name: ltsv_http_response_bytes_total
    kind: counter
    value_key: size
    help: http response bytes total
    labels:
      - vhost
      - method
      - code
  - name: ltsv_http_response_seconds
    kind: histogram
    value_key: resptime
    help: http response seconds
    buckets:
      - 0.005
      - 0.01
      - 0.025
      - 0.05
      - 0.1
      - 0.25
      - 0.5
      - 1.0
      - 2.5
      - 5.0
      - 10.0
    labels:
      - vhost
      - method
      - code
      - path
      - host

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

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