Coder Social home page Coder Social logo

optics's Introduction

Optics

Metrics gathering library for high-throughput data which supports polling by an external agent.

Building

Dependencies:

  • cmake
  • libbsd
  • libmicrohttpd

Optional Dependencies:

  • ninja (faster than gmake)
  • cmocka (tests are disabled if not present)
  • valgrind (run with ctest -V . -L valgrind)
  • ubsan (part of clang - enabled via cmake -DENABLE_UBSAN)
  • clang-tidy (run with ninja clang-tidy)

Building:

cmake . -G Ninja
ninja
ninja test
sudo ninja install

Out-of-source build (recommended for devs):

mkdir build
(cd build; cmake .. -G Ninja)
ninja -C build
ninja -C build test
sudo ninja -C build install

Options:

  • cmake . -G Ninja: use ninja which is generally faster than gmake
  • cmake . -DENABLE_UBSAN=ON: compile with the gcc undefined behaviour sanitizer
  • cmake . -DCMAKE_INSTALL_PREFIX=/path/to/install: where files should be installed (defaults to /usr/local)
  • ninja clang-tidy: compile opticsd with clang-tidy
  • ctest -V . -L test: Run only the functional tests
  • ctest -V . -L valgrind: Run only the valgrind tests
  • ctest -V . -L bench: run only the benchmarks

Usage

To log metrics refer to this example which describes the basics of creating and logging metrics.

Polling metrics is accomplished by running the opticsd daemon which will automatically pick up any newly created optics instances and start dumping them to its configured backends. The following is a simple example for running the daemon:

	opticsd --freq=10 --http-port=3002 --dump-prometheus --dump-carbon=127.0.0.1:2003

Use the --help argument for more options.

The daemon also has a simple HTTP interface to dump the current set of available values and can be queried like so:

curl -s localhost:3002/metrics/json

Pre-emptive Nit-picking

  • Assumes AMD64
  • Not 100% POSIX-compliant
  • Only Linux is supported

optics's People

Contributors

rattab avatar haguenau avatar fbernier avatar fsaintjacques avatar

Watchers

Julian Squires avatar James Cloos avatar  avatar

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.