Skip to content

Commit d38c6dc

Browse files
committed
fix: change string in order to make format method work correctly
1 parent de17b34 commit d38c6dc

File tree

1 file changed

+3
-3
lines changed
  • mamonsu/plugins/system/linux

1 file changed

+3
-3
lines changed

mamonsu/plugins/system/linux/la.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class La(Plugin):
55
AgentPluginType = 'sys'
66
query_agent = "cat /proc/loadavg | awk '{ print $1 }'"
7-
key = 'system.la{}'
7+
key = 'system.la{0}'
88

99
def run(self, zbx):
1010
la_1 = open('/proc/loadavg', 'r').read().split(' ')[0]
@@ -13,7 +13,7 @@ def run(self, zbx):
1313
def items(self, template):
1414
return template.item({
1515
'name': 'System load average over 1 minute',
16-
'key': self.right_type(self.key, '1'),
16+
'key': self.right_type(self.key, var='1'),
1717
'delay': self.plugin_config('interval')
1818
})
1919

@@ -25,4 +25,4 @@ def graphs(self, template):
2525
def keys_and_queries(self, template_zabbix):
2626
result = []
2727
result.append('system.la.1,{0}'.format(self.query_agent))
28-
return template_zabbix.key_and_query(result)
28+
return template_zabbix.key_and_query(result)

0 commit comments

Comments
 (0)