GithubHelp home page GithubHelp logo

monitoring-prometheus-grafana's Introduction

Monitoring with Prometheus, Grafana

Screenshot

With this repo we can understand the below topics

  1. Monitoring flow
  2. Prometheus (node exporter, service discovery, pushgatway)
  3. Grafana (dashboards & reporting)

Installations

  1. Prometheus Installation
    1. OS & AMI: AWS EC2 Linux 2 Version AMI (Please be careful the AMI is the 2nd one from the drop-down)
    2. Security Groups: Enable Ports 9090 (for prometheus) and port 9091 (for pushgateway) allow access from anywhere (just for the demonstration)
    3. Make sure to attach an IAM role with Admin access for prometheus (for Proemetheus server to perform service discovery on the EC2 instances)
    4. Link for the user data: https://github.com/cvamsikrishna11/monitoring-prometheus-grafana/blob/main/prometheus-setup.sh
  2. Launch web servers
    1. OS & AMI: AWS EC2 Linux 2 Version AMI (Please be careful the AMI is the 2nd one from the drop-down)
    2. No of instances: 3
    3. Security Groups: Enable Ports 80 (for HTTP traffic of the website) and port 9100 (for node exporter) allow access from anywhere (just for the demonstration)
    4. Link for the user data: https://github.com/cvamsikrishna11/monitoring-prometheus-grafana/blob/main/ecommerce-web-app.sh
  3. Grafana Installation
    1. OS & AMI: Ubuntu Version 20.04 LTS AMI (Please be careful the AMI is the 2nd one from the drop-down)
    2. Security Groups: Enable Ports 3000 (for Grafana)allow access from anywhere (just for the demonstration)
    3. Link for the user data: https://github.com/cvamsikrishna11/monitoring-prometheus-grafana/blob/main/grafana-setup.sh

** To run the Python code to push the run time app logs to prometheus pushgateway **

git clone https://github.com/cvamsikrishna11/monitoring-prometheus-grafana.git
cd monitoring-prometheus-grafana
pip install -r app/requirements.txt (Note: if you are on mac pip3 install -r app/requirements.txt)

Change line number 19 of the app/shoe-hub.py file with your own Prometheus server Public IP

Now, Run the code to send the application logs to Prometheus

python app/shoe-hub.py

Ref:
https://prometheus.io
https://prometheus.io/docs/introduction/overview/
https://devopscube.com/install-configure-prometheus-linux/
https://devopscube.com/monitor-linux-servers-prometheus-node-exporter/
https://prometheus.io/docs/prometheus/latest/configuration/configuration/#ec2_sd_config
https://devopscube.com/integrate-visualize-prometheus-grafana/
https://grafana.com/grafana/dashboards/
https://prometheus.io/download/#pushgateway https://samber.github.io/awesome-prometheus-alerts/rules.html

monitoring-prometheus-grafana's People

Contributors

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