mirror of
https://github.com/NohamR/prometheus-qbittorrent-exporter.git
synced 2026-01-10 16:18:38 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
109924d0da | ||
|
|
b391e5f83a | ||
|
|
b924dd2bbb | ||
|
|
28f1611079 |
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
FROM alpine:3.11
|
||||||
|
|
||||||
|
# Installing required packages
|
||||||
|
RUN apk add --update --no-cache \
|
||||||
|
python3
|
||||||
|
|
||||||
|
# Install package
|
||||||
|
RUN pip3 install prometheus-qbittorrent-exporter==1.0.1
|
||||||
|
|
||||||
|
ENV QBITTORRENT_HOST=""
|
||||||
|
ENV QBITTORRENT_PORT=""
|
||||||
|
ENV QBITTORRENT_USER=""
|
||||||
|
ENV QBITTORRENT_PASS=""
|
||||||
|
ENV EXPORTER_PORT="8000"
|
||||||
|
ENV EXPORTER_LOG_LEVEL="INFO"
|
||||||
|
|
||||||
|
ENTRYPOINT ["qbittorrent-exporter"]
|
||||||
12
README.md
12
README.md
@@ -20,7 +20,7 @@ qbittorrent-exporter
|
|||||||
Another option is run it in a docker container.
|
Another option is run it in a docker container.
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run esanchezm/prometheus-qbittorrent-exporter
|
docker run -e QBITTORRENT_PORT=8080 -e QBITTORRENT_HOST=myserver.local -p 8000:8000 esanchezm/prometheus-qbittorrent-exporter
|
||||||
```
|
```
|
||||||
|
|
||||||
The application reads configuration using environment variables:
|
The application reads configuration using environment variables:
|
||||||
@@ -43,11 +43,11 @@ These are the metrics this program exports:
|
|||||||
| Metric name | Type | Description |
|
| Metric name | Type | Description |
|
||||||
| --------------------------------------------------- | -------- | ---------------- |
|
| --------------------------------------------------- | -------- | ---------------- |
|
||||||
| `qbittorrent_up` | gauge | Whether if the qBittorrent server is answering requests from this exporter. A `version` label with the server version is added |
|
| `qbittorrent_up` | gauge | Whether if the qBittorrent server is answering requests from this exporter. A `version` label with the server version is added |
|
||||||
| `qbittorrent_connected` | gauge | Whether if the qBittorrent server is connected to the Bittorrent network. |
|
| `connected` | gauge | Whether if the qBittorrent server is connected to the Bittorrent network. |
|
||||||
| `qbittorrent_firewalled` | gauge | Whether if the qBittorrent server is connected to the Bittorrent network but is behind a firewall. |
|
| `firewalled` | gauge | Whether if the qBittorrent server is connected to the Bittorrent network but is behind a firewall. |
|
||||||
| `qbittorrent_dht_nodes` | gauge | Number of DHT nodes connected to |
|
| `dht_nodes` | gauge | Number of DHT nodes connected to |
|
||||||
| `qbittorrent_dl_info_data` | counter | Data downloaded since the server started, in bytes |
|
| `dl_info_data` | counter | Data downloaded since the server started, in bytes |
|
||||||
| `qbittorrent_up_info_data` | counter | Data uploaded since the server started, in bytes |
|
| `up_info_data` | counter | Data uploaded since the server started, in bytes |
|
||||||
| `torrents_count` | gauge | Number of torrents for each `category` and `status`. Example: `torrents_count{category="movies",status="downloading"}`|
|
| `torrents_count` | gauge | Number of torrents for each `category` and `status`. Example: `torrents_count{category="movies",status="downloading"}`|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ class QbittorrentMetricsCollector():
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
"name": "up",
|
"name": "qbittorrent_up",
|
||||||
"value": response is None,
|
"value": response is not None,
|
||||||
"labels": {"version": version},
|
"labels": {"version": version},
|
||||||
"help": "Whether if server is alive or not",
|
"help": "Whether if server is alive or not",
|
||||||
},
|
},
|
||||||
|
|||||||
4
setup.py
4
setup.py
@@ -6,14 +6,14 @@ with open("README.md", "r") as fh:
|
|||||||
setup(
|
setup(
|
||||||
name='prometheus-qbittorrent-exporter',
|
name='prometheus-qbittorrent-exporter',
|
||||||
packages=['qbittorrent_exporter'],
|
packages=['qbittorrent_exporter'],
|
||||||
version='1.0.0',
|
version='1.0.1',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
description='Prometheus exporter for qbittorrent',
|
description='Prometheus exporter for qbittorrent',
|
||||||
author='Esteban Sanchez',
|
author='Esteban Sanchez',
|
||||||
author_email='esteban.sanchez@gmail.com',
|
author_email='esteban.sanchez@gmail.com',
|
||||||
url='https://github.com/esanchezm/prometheus-qbittorrent-exporter',
|
url='https://github.com/esanchezm/prometheus-qbittorrent-exporter',
|
||||||
download_url='https://github.com/spreaker/prometheus-qbittorrent-exporter/archive/1.0.0.tar.gz',
|
download_url='https://github.com/esanchezm/prometheus-qbittorrent-exporter/archive/1.0.1.tar.gz',
|
||||||
keywords=['prometheus', 'qbittorrent'],
|
keywords=['prometheus', 'qbittorrent'],
|
||||||
classifiers=[],
|
classifiers=[],
|
||||||
python_requires='>=3',
|
python_requires='>=3',
|
||||||
|
|||||||
Reference in New Issue
Block a user