crholliday / iota-prom-exporter

Iota Exporter for Prometheus Metrics
32 stars 5 forks source link
dashboard docker grafana iota javascript metrics prometheus zmq

iota-prom-exporter

Prometheus Exporter for IOTA fullnode metrics

Latest Changes:

March 6, 2018

February 19, 2018

February 3, 2018

January 21, 2018

January 16, 2018

What does it do?

Works with Prometheus and (optionally) Grafana to export instrumentation metrics from an IOTA full node as well as pulls metrics from Bitfinex's webservice API for market data and the IOTA stress table for TPS statistics.

If you run Carriota Field, Dave has a nice exporter for Field metrics

The following images are from my IOTA dashboard. The top looks like this:

top of dashboard

The next section contains market pricing data and data from the stresstest node:

top of dashboard

Finally, I have a template section for all my neighbors:

top of dashboard

Nuriel Shem-Tov has a great installer which deploys, among other things, IOTA IRI, IOTA PM, Grafana, Prometheus and this Exporter. Please visit his docs if your intent is to get the whole stack up and running as easily as possible: IRI-Playbook

IOTA Partners also has a copy+paste installation playbook that is also great. Check out both and decide which one is right for you.

Current Metrics

Dependencies

Installation

Do not run npm install as root as it the zeroMQ and levelDB prebuild dependencies will break the install

git clone https://github.com/crholliday/iota-prom-exporter.git
cd iota-prom-exporter
npm install
node app.js

Rename config-template.js to config.js and update the settings inside (change the port of your IRI installation)

The exporter is configured to run on port 9311 so as to comply with the list of export default ports

Once installed and working you will then need to edit the Prometheus config file - /etc/prometheus/prometheus.yml and add a section like the below:

# iota-prom-exporter section
# scrape_interval is optional as it will default to the default
- job_name: 'iota_exporter'
    scrape_interval: 5s
    static_configs:
      - targets: ['localhost:9311']

I find I need to restart the Prometheus service sudo service prometheus restart after adding an exporter.

Test by navigating to http://localhost:9311/metrics

Grafana

Once the above is done, the metrics will be available to be consumed in a Grafana dashboard.

Docker

The following docker image is available: iota-prom-exporter

make sure to mount your config file, otherwise the image defaults to conifg.example.js

docker run -v your.config.js:/exporter/config.js -p 9311:9311 bambash/iota-prom-exporter

you can also build your own image

docker build . -t iota-prom-exporter
docker run -v your.config.js:/exporter/config.js -p 9311:9311 iota-prom-exporter