Giter Site home page Giter Site logo

rancher-catalog-stats's Introduction

rancher-catalog-stats

The rancher-catalog-stats service gathers metrics from rancher nginx logs files and sends them to influxdb in order to be explored by grafana.

Running in daemon mode will tail files and send metrics every refresh seconds.

Build

docker build -t rancherlabs/rancher-catalog-stats:latest .

Usage

Usage of rancher-catalog-stats:
  -daemon
      Run in daemon mode. Tail files and send metrics continuously by limit or by refresh
  -fileold string
      Log files with modification time older than that, will be discarded (default "1h")
  -filepath string
      Log files to analyze, wildcard allowed between quotes. (default "/var/log/nginx/access.log")
  -format string
      Output format, influx | json (default "influx")
  -geoipdb string
      Geoip db file. (default "GeoLite2-City.mmdb")
  -influxdb string
      Influx db name
  -influxpass string
      Influx password
  -influxurl string
      Influx url connection (default "http://localhost:8086")
  -influxuser string
      Influx username
  -limit int
      Limit batch size (default 2000)
  -poll
      Use poll instead of inotify. daemon mode
  - preview
      Print metrics to stdout
  -refresh int
      Send metrics every refresh seconds. daemon mode (default 120)

NOTE: influxdb should already installed and running. The database will be created if doesn't already exist.

Metrics

The format is as follows:

requests,city=Toronto,country=Canada,country_isocode=CA,host=git.rancher.io,ip=xx.xx.xx.xx,method=GET,path=/rancher-catalog.git/info/refs?service\=git-upload-pack,status=200,uid="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX" ip="xx.xx.xx.xx",uid="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX" 1491289498000000000

rancher-catalog-stats's People

Contributors

rawmind0 avatar oxr463 avatar

Stargazers

Michael Vogeler avatar

Watchers

Chris Olstrom avatar James Cloos avatar Nelson Roberts avatar Vincent Herr avatar Ivan-Clare Ngong avatar  avatar  avatar

rancher-catalog-stats's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.