We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a59fad commit e9254eeCopy full SHA for e9254ee
qnapstats/qnap_stats.py
@@ -257,6 +257,7 @@ def get_system_stats(self):
257
},
258
"nics": {},
259
"dns": [],
260
+ "sysfans": {},
261
}
262
263
nic_count = int(root["nic_cnt"])
@@ -275,6 +276,16 @@ def get_system_stats(self):
275
276
"tx_packets": int(root["tx_packet" + i]),
277
"err_packets": int(root["err_packet" + i])
278
279
+
280
+ sysfan_count = int(root["sysfan_count"])
281
+ for sysfan_index in range(sysfan_count):
282
+ i = str(sysfan_index + 1)
283
+ sysfan = "sysfan" + str(sysfan_index)
284
+ details["sysfans"][sysfan] = {
285
+ "speed": int(root["sysfan" + i]),
286
+ "status": "alert" if int(root["sysfan" + i + "_stat"]) == -1 else "ok"
287
+ }
288
289
290
dnsInfo = root.get("dnsInfo")
291
if dnsInfo:
0 commit comments