Code Monkey home page Code Monkey logo

Comments (1)

abracadaniel avatar abracadaniel commented on July 21, 2024

Hi,
Yes, I have prometheus running.

In the block-producing node I just run with:

 -e PROMETHEUS_HOST="0.0.0.0"
 -e PROMETHEUS_PORT="12798"
 -p 1798:1798

You can for example look in your config.json file for your node, to make sure that the Prometheus part looks as following:

 "hasPrometheus": [
  "0.0.0.0",
  12798
 ],

If you have already initialized your node without having the correct prometheus parameter, the config.json has been created without them. The container will not replace an already initialized configuration.

Then I've set up firewall rules so its only the LAN IP of the relay nodes, and the prometheus node which can connect to port 12798 and port 3000 on the block-producing node. All other traffic is blocked.

On another host (lets call it the prometheus host), i run the following containers:

docker run -d \
    --restart=unless-stopped \
    --network=cardano \
    --name prometheus \
    -v $PWD/config/prometheus/:/config/ \
    prom/prometheus:latest

docker run -d \
    --restart=unless-stopped \
    --network=cardano  \
    --name grafana \
    -p 9000:3000 \
    grafana/grafana

My Prometheus config.yml located in $PWD/config/prometheus/config.yml, on the prometheus host, looks as following:

global:
  scrape_interval:     15s

  external_labels:
    monitor: 'codelab-monitor'

scrape_configs:
  - job_name: 'cardano'  # To scrape data from the cardano node
    scrape_interval: 5s
    static_configs:
      - targets: ['<LAN IP of relay>:12798']
        labels:
          alias: 'relay1'
          type:  'cardano-node'  
      - targets: ['<LAN ip of block-producing>:12798']
        labels:
          alias: 'block-producing1'
          type:  'cardano-node'

  - job_name: 'node' # To scrape data from a node exporter to monitor your linux host metrics.
    scrape_interval: 5s
    static_configs:
    - targets: ['<LAN IP of relay>:9100']
      labels:
        alias: 'relay1'
        type:  'node'  
    - targets: ['<LAN ip of block-producing>:9100']
      labels:
        alias: 'block-producing1'
        type:  'node'

Then I configure Grafana to fetch data from the prometheus container running besides the Grafana container, and add the dashboard settings that IOHK has published, with a few modifications. I can share my grafana dashboard if you want, when you get it running.

from cardano-pool-docker.

Related Issues (20)

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.