From 109924d0da9c2560dde84552ee559343d77477e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20S=C3=A1nchez?= Date: Tue, 29 Sep 2020 13:46:41 +0200 Subject: [PATCH] Fixed up metric value and documentation --- README.md | 10 +++++----- qbittorrent_exporter/exporter.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index eacfe2f..d56daec 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/qbittorrent_exporter/exporter.py b/qbittorrent_exporter/exporter.py index 2418b56..fee9cb2 100644 --- a/qbittorrent_exporter/exporter.py +++ b/qbittorrent_exporter/exporter.py @@ -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", },