Coder Social home page Coder Social logo

aconcagua's Introduction

aconcagua

About metrics:

Running in docker:

  • See config files section
docker network create --driver bridge metrics

docker run \
  --name=prometheus \
  -p 9090:9090 \
  --network metrics \
  -v ~/code/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml \
  prom/prometheus

docker run \
  --name=grafana \
  -p 3000:3000 \
  --network metrics \
  grafana/grafana:latest
  • Head over localhost:3000 in your browser to open up grafana
  • User admin password admin
  • Add datasource because we created a user defined network in docker we now can connect to prometheus by its container name and port: prometheus:9090
  • Save and test (should show a green popup)
  • Create dashboard
  • Add panel
  • In the metrics text box start typing total_requests
  • Repeat

Running on your host machine:

prometheus --config.file="prometheus.yml"

grafana-server \
  --config=/usr/local/etc/grafana/grafana.ini \
  --homepath /usr/local/share/grafana \
  --packaging=brew cfg:default.paths.logs=/usr/local/var/log/grafana \
  cfg:default.paths.data=/usr/local/var/lib/grafana \
  cfg:default.paths.plugins=/usr/local/var/lib/grafana/plugins

Config files

prometheus.yml config file

global:
  scrape_interval: 15s # By default, scrape targets every 15 seconds.

  # Attach these labels to any time series or alerts when communicating with
  # external systems (federation, remote storage, Alertmanager).
  external_labels:
    monitor: 'codelab-monitor'

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'aconcagua'

    # Override the global default and scrape targets from this job every 5 seconds.
    scrape_interval: 1s

    static_configs:
      #      - targets: [ 'localhost:8080' ] # if prometheus and your app runs on docker
      - targets: [ 'host.docker.internal:8080' ] # if prometheus runs on docker but your app doesn't

aconcagua's People

Contributors

github-actions[bot] avatar palanga 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.