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 6f25221 commit 213fa5dCopy full SHA for 213fa5d
bgw210-700_to_graphite.py
@@ -35,6 +35,9 @@
35
36
2018-09-01 Jason Antman <[email protected]>:
37
- initial version of script
38
+
39
+2025-05-29 Jason Antman <[email protected]>:
40
+ - fix for uptime now being a number of seconds instead of a string
41
"""
42
43
import logging
@@ -293,10 +296,8 @@ def _broadband_stats(self):
293
296
def _sysinfo(self):
294
297
tree = self._get_page('http://%s/cgi-bin/sysinfo.ha' % self.ip)
295
298
info = self._do_kv_table(tree.xpath('//table')[0])
- parts = [int(x) for x in info['Time Since Last Reboot'].split(':')]
299
return {
- 'uptime_sec': parts[0] * 86400 + parts[1] * 3600 +
- parts[2] * 60 + parts[3]
300
+ 'uptime_sec': int(info['Time Since Last Reboot'])
301
}
302
303
0 commit comments