Giter Club home page Giter Club logo

bitcoin-exporter's Introduction

The bitcoin-exporter scrapes the GDAX API for the trading prices of various cryptocurrencies and your account balances and produces Prometheus metrics that you can alert on.

Configuration

Create a config/bitcoin-exporter.yml file containing your coinbase GDAX credentials:

coinbase:
  key: baoenuth32401923hsnaotehu9123
  secret: 245092394023euenchu/01923==
  passphrase: hello

Next, create an alertmanager configuration called config/alertmanager.yml:

route:
  receiver: 'slack'

receivers:
  - name: 'slack'
    slack_configs:
    - send_resolved: true
      username: 'Bitcoin Bot'
      channel: '#bitcoin'
      api_url: 'your api url'
      text: "{{ range .Alerts }}{{ .Annotations.description }}\n{{ end }}"

Alert writing

To write an alert, add an alert into config/alerts/.

Starting the stack

To start a stack, complete with the bitcoin-exporter, Grafana, Prometheus, and AlertManager, run:

make build
make up

If you run git pull or make any changes, use make build to rebuild before make up.

Run make status to print out the IPs of Grafana and Prometheus.

Run make logs to print the logs of the bitcoin-exporter service.

If you receive no balance metrics, make sure that your clock is correct.

Building a Docker image

If you already run Prometheus, Grafana, etc, then you can just build the docker image:

make build-image

This will build a Docker image tagged as bitcoin-exporter that you can use.

Building a binary

If you just want the binary to run, you can just build that:

make build-bin

bitcoin-exporter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bitcoin-exporter's Issues

Failure to fetch deps

 ---> Running in 7dbda759109d
package github.com/cespare/xxhash/v2: cannot find package "github.com/cespare/xxhash/v2" in any of:
        /usr/local/go/src/github.com/cespare/xxhash/v2 (from $GOROOT)
        /go/src/github.com/cespare/xxhash/v2 (from $GOPATH)
ERROR: Service 'bitcoin-exporter' failed to build : The command '/bin/sh -c go get -d -t ./...' returned a non-zero code: 1```

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.