File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
mamonsu/plugins/system/linux Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 4
4
class La (Plugin ):
5
5
AgentPluginType = 'sys'
6
6
query_agent = "cat /proc/loadavg | awk '{ print $1 }'"
7
- key = 'system.la{}'
7
+ key = 'system.la{0 }'
8
8
9
9
def run (self , zbx ):
10
10
la_1 = open ('/proc/loadavg' , 'r' ).read ().split (' ' )[0 ]
@@ -13,7 +13,7 @@ def run(self, zbx):
13
13
def items (self , template ):
14
14
return template .item ({
15
15
'name' : 'System load average over 1 minute' ,
16
- 'key' : self .right_type (self .key , '1' ),
16
+ 'key' : self .right_type (self .key , var = '1' ),
17
17
'delay' : self .plugin_config ('interval' )
18
18
})
19
19
@@ -25,4 +25,4 @@ def graphs(self, template):
25
25
def keys_and_queries (self , template_zabbix ):
26
26
result = []
27
27
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 )
You can’t perform that action at this time.
0 commit comments