4 Commits
1.0.1 ... 1.0.2

Author SHA1 Message Date
Esteban Sánchez
109924d0da Fixed up metric value and documentation 2020-09-29 13:46:41 +02:00
Esteban Sánchez
b391e5f83a Fixed docker run line 2020-09-29 12:03:26 +02:00
Esteban Sánchez
b924dd2bbb Added Dockerfile 2020-09-29 11:54:26 +02:00
Esteban Sánchez
28f1611079 Fixed first version 2020-09-29 11:52:09 +02:00
4 changed files with 27 additions and 10 deletions

17
Dockerfile Normal file
View 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"]

View File

@@ -20,7 +20,7 @@ qbittorrent-exporter
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:
@@ -43,11 +43,11 @@ These are the metrics this program exports:
| 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_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. |
| `qbittorrent_dht_nodes` | gauge | Number of DHT nodes connected to |
| `qbittorrent_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 |
| `connected` | gauge | Whether if the qBittorrent server is connected to the Bittorrent network. |
| `firewalled` | gauge | Whether if the qBittorrent server is connected to the Bittorrent network but is behind a firewall. |
| `dht_nodes` | gauge | Number of DHT nodes connected to |
| `dl_info_data` | counter | Data downloaded 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"}`|
## License

View File

@@ -77,8 +77,8 @@ class QbittorrentMetricsCollector():
return [
{
"name": "up",
"value": response is None,
"name": "qbittorrent_up",
"value": response is not None,
"labels": {"version": version},
"help": "Whether if server is alive or not",
},

View File

@@ -6,14 +6,14 @@ with open("README.md", "r") as fh:
setup(
name='prometheus-qbittorrent-exporter',
packages=['qbittorrent_exporter'],
version='1.0.0',
version='1.0.1',
long_description=long_description,
long_description_content_type="text/markdown",
description='Prometheus exporter for qbittorrent',
author='Esteban Sanchez',
author_email='esteban.sanchez@gmail.com',
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'],
classifiers=[],
python_requires='>=3',