A Multi-Thread Media downloader for small size files like image.
Dependencies are listed in requirements.txt
file and automatically installed by Docker
.
Environment Variables can set/change in docker-compose.yml
environment:
DOWNLOADER_MODE: "VPN"
DOWNLOADER_THREAD_NO: "40"
REQUEST_TIMEOUT: "30"
CONNECTION_ESTABLISHMENT_TIMEOUT: "1"
DOWNLOADING_PATH: "media"
DOWNLOADER_MAX_RETRY: "1"
run downloader by following command:
sudo docker-compose up
after successfully run this command logs should be like this:
Prometheus Metrics
are accessible in localhost:5000
Metrics are:
File_Average_Size
Total
countFaild
countSuccess
countPermissoin_Denied
errors countNot_Found
errors countInternal_Server
errors countTimeout
errors countNot_Valid
errors countFile_Average_Time
countAverage_Rate
of downloading filesFile_Per_Second
count
All downloaded file saved with a unique uuid
in DOWNLOADING_PATH
folder specified name in environment variable in docker-compose.yml
.
You can clone prometheus
from here and track live data reporting by
Gragana
panel running on localhost:3000
Notice: you should change targets
in prometheus/prometheus/prometheus.yml
to:
scrape_configs:
- job_name: my-service
static_configs:
- targets:
- {YOUR-SYSTEM-IP-ADDRESS}:5000
Grafana panel should be something like this:
Amir Rezaei @ameerezae