English | Indonesia
Scraping data from app MyBiznet (app.biznet.id) to Prometheus -> Grafana.
This project facilitates monitoring bandwidth usage from the MyBiznet application (app.biznet.id) by integrating it with Prometheus and Grafana. The integration enables users to visualize their bandwidth consumption through Grafana dashboards, providing insights into their internet usage patterns.
-
Data Scraping with Shell Script
A shell script (biznet.sh) is employed to extract bandwidth data from the MyBiznet application. This script can be scheduled to run at regular intervals using cron, ensuring continuous data collection.
-
Prometheus Integration
Prometheus is configured to scrape the data collected by the shell script. The scraped metrics are stored in Prometheus's time-series database, making them available for querying and analysis.
-
Grafana Dashboard
A pre-built Grafana dashboard template (Biznet-Home-Quota.json) is provided for visualizing the bandwidth data. Users can import this template into their Grafana instance to gain immediate access to visual representations of their bandwidth usage.
- Visit https://crontab.guru/
- Make a folder
mkdir /root/{name anything you want}, example: /root/script
- Put the script from the shell script, Save & Apply.
- Do
chmod a+rx (to your file), for example: /root/boot/script
- Open
crontab -e
- Insert
@reboot /bin/bash (to your file), example: /root/boot/script
. Save & Apply. - Done.
- Download this template here.
- Open the Grafana Dashboard.
- Add New, then Import.
- Upload the dashboard JSON file and put anything in your desired folder.
- Change UID if necessary.
- Import.
- Done.