Git Product home page Git Product logo

prometheus-express's Introduction

Prometheus/Express

Description

This is a simple example of how to use Prometheus with Express. To run this example, you need to have Docker installed.

How to run

  1. Clone this repository
  2. Clone Dockprom
  3. Access the dockprom folder
  4. In dockprom folder, access the prometheus/prometheus.yml file and add the following lines at the end scrape_configs
  - job_name: nodejs
    scrape_interval: 10s
    honor_labels: true
    static_configs:
    - targets: ['172.17.0.1:3333'] # 'node-app', 'localhost:3333', 'host.docker.internal:9991'

Note: If you are using Windows or Mac and your app is running at the host machine, you need to use host.docker.internal instead of localhost. If you are using Linux, you should use 172.17.0.1. If you are running the app together with dockprom, you can use your-app-service as target.

  1. Run docker-compose up -d in dockprom folder

If you are running your app at the host machine, you need to change the targets in prometheus.yml to host.docker.internal:9991 for Mac or Windows or 172.17.0.1:3333 for Linux.

  1. Access this repository folder
  2. Run npm install
  3. Run docker-compose up -d
  4. Access http://localhost:3333 to see the app running
  5. Access http://localhost:9090 to see Prometheus running
  6. Access http://localhost:3000 to see Grafana running

prometheus-express's People

Contributors

rwietter avatar

Watchers

 avatar

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.