Skip to content

Commit 702b799

Browse files
committed
fix
1 parent 0da446f commit 702b799

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/check/node.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async def check_node(
3737
data = await resp.json()
3838

3939
node = data['data']
40-
boot = node.get('bootinfo')
40+
boot = node.get('boot-info')
4141
cpu = node.get('cpuinfo')
4242
k = node.get('current-kernel')
4343
ksm = node.get('ksm')
@@ -47,12 +47,12 @@ async def check_node(
4747
item = {
4848
'name': 'node', # str
4949
'kversion': node.get('kversion'), # str
50-
'pversion': node.get('pversion'), # str
50+
'pveversion': node.get('pveversion'), # str
5151
'loadavg': [float(v) for v in node['loadavg']] \
5252
if isinstance(node.get('loadavg'), list) else None,
53-
'cpu': node.get('cpu'), # int
54-
'idle': node.get('idle'), # int
55-
'wait': node.get('wait'), # int
53+
'cpu': to_float(node.get('cpu')), # int
54+
'idle': to_float(node.get('idle')), # float
55+
'wait': to_float(node.get('wait')), # float
5656
'uptime': node.get('uptime'), # int
5757
}
5858
state = {

0 commit comments

Comments
 (0)