Coder Social home page Coder Social logo

custom-feed-prometheus's Introduction

Custom-Feed-Prometheus

This lets you add a custom feed for Prometheus / Grafana for crypto projects.

If you havent yet set up prometheus/grafana check out this guide here Avax Node Monitoring Guide

How to use

Install node.js

sudo apt-get install nodejs

Edit Prometheus yml

Edit your prometheus yml file with sudo nano /etc/prometheus/prometheus.yml adding in the content of prometheus yml under you other jobs. After updating and saving use to restart prometheus sudo systemctl restart prometheus. Then do sudo systemctl status prometheus to see if prometheus is working fine. If it isnt then you need to redo the config and make sure your spacing is correct.

Open ports if you want too

If you want to open your ports to view the prometheus dashboard/jobs use sudo ufw allow 9090/tcp replace your port # for each job

Run node script

Run avax-app.js script to pull these data feeds on port 9800

run with nohup to keep running after terminal is closed nohup node avax-app.js & or nohup node generalized-app.js & depending on which script you want to use.

Run node script on startup

Automatically start the script on reboot by editing your crontab with crontab -e and adding the line @reboot sh -c 'cd /home/app/directory && pm2 start avax-app.js' (or generalized-app.js)

Debugging

sudo lsof -i :9800 Find PID of program using port 9800 kill -9 pid Kill via PID

Credit to @CarnivalBen on github for making this

custom-feed-prometheus's People

Contributors

armehanh avatar darkghost7 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

armehanh

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.