Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

DevOps Project : Monitoring-grafana-blackbox

image

  • Purpose: In this project we will setup the Grafana-blackbox locally using Docker Compose. And we"ll configure some URLs to monitor them on the Grafana dashbpard.
  • Prerequisites:
  1. OS: Ubuntu
  2. Docker
  3. GitHub

Lets understand the basics of Grafana

  • In today's world of DevOps and CloudComputing, Grafana has emerged as a go-to tool for monitoring and observability. Whether you're tracking server performance, application logs, or business metrics, Grafana makes it easy to create beautiful, real-time dashboards that provide actionable insights.

Here’s why Grafana should be in your toolkit:

  1. 📊 Customizable Dashboards - Tailor your views to what matters most.
  2. 🔗 Integrations Galore - From Prometheus to InfluxDB, it integrates with numerous data sources.
  3. 🔍 Powerful Alerts - Stay ahead of issues with Grafana’s alerting system.
  4. 🚀 Scalability - Suitable for startups to enterprise-level infrastructures.

Ready to supercharge your monitoring and observability game? Try out Grafana and see the difference it makes!


Grafans installation:

  1. Run the following command.
    • Firstly we cloned the repository frm the GitHub.
    git clone https://github.com/cmjagtap/Website-Monitoring.git
    
    • Then we will see inside the repo and enter in the "Website-Monitoring" directory and from there we"ll go inside "blackbox_exporter-0.18.0.linux-amd64".

image

  • Now run the command inside
./blackbox_exporter --config.file=blackbox.yml &> output.log &

image

  • Now we checked the port status with the following command and got that Port 9115 is open for blackbox.
    ss -tulnp
    

image

  • Check the IP and hit on the browser with port 9115
    ip a
    

image


image

  • Now make up all the containers by running the command.
docker-compose up -d

image

  • Open the url of Prometheus with (your system) IP and Port.

image

image

  • Use "admin" as user and the password for login.

image

image

  • Configure the data source which is Prometheus.

Screenshot 2024-10-22 185813

  • Import a new dashboard. Use Dashboard id 13659

Screenshot 2024-10-22 162944

Screenshot 2024-10-22 173254

image

  • Now let's check the URLs added for monitoring in the "prometheus.yml" file.

Screenshot 2024-10-23 120833

vim promethereus.yml

Screenshot 2024-10-23 114804

  • If we need to add more URL in the list to moniter then we have to add the domain name in the same file under "tragets" section. For example I'm adding a new URL.

Screenshot 2024-10-23 121836

  • After adding the new URL, save the file and restart the prometheus container.
docker-compose restart prometheus
  • Now refresh the Grafana dashboard page and the new URL will reflect in the list as shown in the snapshot.

Screenshot 2024-10-23 122426



System Monitoring

  • In this task we will configure our system for montoring using the same tool : Grafana, Prometheus and we will use Node Exportere instead of Blackbox Exportere (as we used in the application onitoring)

  • Download Node Exporter

wget https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-amd64.tar.gz
tar xvfz node_exporter-1.6.1.linux-amd64.tar.gz
cd node_exporter-1.6.1.linux-amd64
./node_exporter &
  • Check the default port of Node explorer which is 9100
ss -tulnp

Screenshot 2024-10-23 125430

Screenshot 2024-10-23 181244

  • These are the other snapshots of different testing machine.

Grafana-dashboard

Promethus

grafan-blackbox


Error and trouble shooting

  • After updating the prometheus.yml file, I got the error of connection refused and showing no data on the Dashboard. image

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors