pre-release
This commit is contained in:
parent
f021ae51b8
commit
daabbe3388
1 changed files with 11 additions and 11 deletions
|
@ -77,18 +77,18 @@ class QbittorrentMetricsCollector():
|
||||||
)
|
)
|
||||||
|
|
||||||
#Photos
|
#Photos
|
||||||
usersDatas = response_user_stats.json()["usageByUser"] # TODO rename usersdatas in the future
|
userData = response_user_stats.json()["usageByUser"]
|
||||||
for x in range(0,userCount): # TODO rename usersdatas in the future
|
for x in range(0,userCount):
|
||||||
metrics.append(
|
metrics.append(
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": f"{self.config['metrics_prefix']}_photos_by_user",
|
"name": f"{self.config['metrics_prefix']}_photos_by_user",
|
||||||
"value": usersDatas[x]['photos'],
|
"value": userData[x]['photos'],
|
||||||
"labels": {
|
"labels": {
|
||||||
"firstName": usersDatas[x]["userFirstName"],
|
"firstName": userData[x]["userFirstName"],
|
||||||
|
|
||||||
},
|
},
|
||||||
"help": f"Number of photos by user {usersDatas[x]['userFirstName']} "
|
"help": f"Number of photos by user {userData[x]['userFirstName']} "
|
||||||
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -98,12 +98,12 @@ class QbittorrentMetricsCollector():
|
||||||
metrics.append(
|
metrics.append(
|
||||||
{
|
{
|
||||||
"name": f"{self.config['metrics_prefix']}_videos_by_user",
|
"name": f"{self.config['metrics_prefix']}_videos_by_user",
|
||||||
"value": usersDatas[x]['videos'],
|
"value": userData[x]['videos'],
|
||||||
"labels": {
|
"labels": {
|
||||||
"firstName": usersDatas[x]["userFirstName"],
|
"firstName": userData[x]["userFirstName"],
|
||||||
|
|
||||||
},
|
},
|
||||||
"help": f"Number of photos by user {usersDatas[x]['userFirstName']} "
|
"help": f"Number of photos by user {userData[x]['userFirstName']} "
|
||||||
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -112,12 +112,12 @@ class QbittorrentMetricsCollector():
|
||||||
metrics.append(
|
metrics.append(
|
||||||
{
|
{
|
||||||
"name": f"{self.config['metrics_prefix']}_usage_by_user",
|
"name": f"{self.config['metrics_prefix']}_usage_by_user",
|
||||||
"value": (usersDatas[x]['usage']),
|
"value": (userData[x]['usage']),
|
||||||
"labels": {
|
"labels": {
|
||||||
"firstName": usersDatas[x]["userFirstName"],
|
"firstName": userData[x]["userFirstName"],
|
||||||
|
|
||||||
},
|
},
|
||||||
"help": f"Number of photos by user {usersDatas[x]['userFirstName']} "
|
"help": f"Number of photos by user {userData[x]['userFirstName']} "
|
||||||
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue