Giter Club home page Giter Club logo

go-lnmetrics.reporter's Introduction

๐Ÿ“ˆ go-lnmetrics-reporter ๐Ÿ“Š

Reference implementation written in Go lang to collect and report of the lightning node metrics

GitHub Workflow Status Discord GitHub release (latest by date)

Table of Content

  • Introduction
  • Install Procedure
  • How to Use
  • How to Contribute
  • Build With
  • License

Introduction

go-lnmetrics.reporter is the reference implementation of a lnmetrics client (see definition of lnmetrics client here). It is written in Go lang to use the power of the statically compiled binary that a user can easily run on the target machine. This help to speedup the data collection process very easily.

In addition, this plugin support the following metrics, and you can also see the in the spec what data of your ln node are shared with the server.

Install Procedure

It is suggested to work with the tagged version that you can find in the release page.

The installation process required just to download the right binary from your host machine, and configure c-lightning (that it is the only implementation supported right now) to run the plugin and pass the server link to lightnind.

The configuration suggested is to use the config file, with the following content

... other stuff...
 
plugin=/path/binary/go-lnmetrics-{archirecture}
lnmetrics-urls=https://api.lnmetrics.info/query

Where the lnmetrics-urls give the possibility to specify the server where the plugin need to report the data if any. You can specify more that one server with just append another url divided by a comma.

In addition, there are the following optional parameters:

  • lnmetrics-noproxy: Force the disabling of the proxy

How to Use

After running the plugin you will have the possibility to run the following rpc command from lightning-cli, and they are described below:

  • metric_one start end: RPC command that give you the possibility to query the internal db and make access to the metric data collected by the plugin. The start and end need to be a string that is the timestamp or you can use the following query to make some particular query:
    • metric_one start="now": Give you the possibility to query the metric data that the plugin have in memory;
    • metric_one start="last": Give you the possibility to query the metric data that the plugin committed to the server last time.
  • lnmetrics-info: RPC command that give you access to the plugin information, like version, go version and architecture this will be useful when there is some bug report or just consult the version of the plugin that the user is running.

How to Contribute

You can contribute in three different way, and them are described below:

  • Bug and feature request through Github discussion/issue or discord channel;
  • Bug fixing through PR;
  • New metric support, this required to follow the lnmetrics.spec guide line

In addition, if you want build the project or you can start to play with it, you need the golang compiler (suggested the last one) and the golangci (see Build With section) to compile the code with the make command.

Build With

License

TODO

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.