Giter VIP home page Giter VIP logo

infrastructure-and-system-monitoring-using-prometheus's Introduction

General

Prerequisites

Build the required Docker images

  • Execute ./build-docker-images.sh

This will build the following images:

  • Spring Boot Prometheus Demo: Spring Boot app with custom metrics added

Configuration

  • Please add your own Slack API webhook in ./steps/6-alerting/alert-manager.yml

Step 1: Running Prometheus native

  • Explain that Prometheus is a Go application which can just be extracted and run
  • Start Prometheus via commandline ./prometheus and show that is running
  • Prometheus
    • Navigate to http://localhost:9090/metrics] > show the metrics that Prometheus itself is generating
    • Navigate to http://localhost:9090 > show prometheus webinterface
    • Show Config file (prometheus.yml) -> show Targets
    • Explain that scraping can be done by various ways (Consul, DNS, or dropping in new config file)

Step 2: Run Prometheus using Docker

  • Start Prometheus using docker-compose > dc up
  • Show docker-compose.yml > including portmapping

Step 3: Add host metrics

  • Start Prometheus using docker-compose > dc up
  • Node exporter
    • Explain Node Exporter
    • Show Node Exporter config inside prometheus.yml > explain scraping
    • Navigate to http://localhost:9100/metrics
    • Explain metrics
  • Prometheus
    • Navigate to http://localhost:9090
    • Show to to query for metrics using the autocomplete
    • Show how to play using the query language (console & graph)
      • node_network_receive_bytes
      • node_network_receive_bytes{device="eth0"}
      • node_network_receive_bytes{device="eth0"}[5m]
      • rate(node_network_receive_bytes{device="eth0"}[5m])

Step 4: Grafana

  • Start Prometheus using docker-compose > dc up
  • Grafana
    • Explain Grafana
    • Navigate to http://localhost:3000
    • Login using > admin/admin
    • Add Datasource
    • Create new Dashboard with widget containing graph from memory
      • node_network_receive_bytes
      • node_network_receive_bytes{device="eth0"}
    • Import dashboard to show the graphs coming from default monitoring of Prometheus
    • Import single server dashboard

Step 5: Monitor Docker Containers

Step 6: Alerting

  • Start Prometheus using docker-compose > dc up
  • Show alert.rules
  • Show alert-manager.yml
  • Alert Manager
  • Prometheus
  • Introduce the Ping container
    • Stop/Start the Ping container -> docker-compose stop ping
  • View the results in:

Step 7: Instrumenting applications

Step 8: Consul demo

  • Start Prometheus using docker-compose > dc up
  • Prometheus
    • Show prometheus.yml > explain consul config
    • Navigate to http://localhost:9090
    • Show targets and see that we are missing the services
  • Consul
    • Navigate to http://localhost:8500
    • Show missing services
    • Register the services using ‘register-services-with-consul.sh`
    • Show the services appearing in Consul
  • Prometheus

Demo Links

infrastructure-and-system-monitoring-using-prometheus's People

Contributors

mpas avatar

Watchers

 avatar  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.