- 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:
- OS: Ubuntu
- Docker
- GitHub
- 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:
- đź“Š Customizable Dashboards - Tailor your views to what matters most.
- đź”— Integrations Galore - From Prometheus to InfluxDB, it integrates with numerous data sources.
- 🔍 Powerful Alerts - Stay ahead of issues with Grafana’s alerting system.
- 🚀 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!
- 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".
- Now run the command inside
./blackbox_exporter --config.file=blackbox.yml &> output.log &
- Now we checked the port status with the following command and got that Port 9115 is open for blackbox.
ss -tulnp
- Check the IP and hit on the browser with port 9115
ip a
- Now make up all the containers by running the command.
docker-compose up -d
- Open the url of Prometheus with (your system) IP and Port.
- Use "admin" as user and the password for login.
- Configure the data source which is Prometheus.
- Import a new dashboard. Use Dashboard id 13659
- Now let's check the URLs added for monitoring in the "prometheus.yml" file.
vim promethereus.yml
- 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.
- 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.
-
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
- These are the other snapshots of different testing machine.