File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ def keys_and_queries(self, template_zabbix):
158
158
return None
159
159
160
160
def _log_exception (self , e , trace ):
161
- self .last_error_text = 'catch error: {0} ' .format (e )
161
+ self .last_error_text = 'plugin {0} caught error: {1} {2} ' .format (self . __class__ . __name__ . lower (), repr ( e ), e )
162
162
self .log .error (self .last_error_text )
163
163
self .log .info ('hint: enable debug level to full exception trace' )
164
164
self .log .debug (trace )
Original file line number Diff line number Diff line change @@ -52,13 +52,12 @@ def _loop(self):
52
52
last_error = plugin .last_error_text
53
53
plugin_errors += 1
54
54
time .sleep (10 )
55
- # error counts
56
55
plugin_probes += 1
57
56
if plugin_probes >= 60 :
58
57
if plugin_errors > 0 :
59
58
self ._sender .send (
60
59
'mamonsu.plugin.errors[]' ,
61
- 'Last: {0}. Total count: {1}.' .format (last_error , plugin_errors ))
60
+ 'Last {0} Total count of errors : {1}.' .format (last_error , plugin_errors ))
62
61
else :
63
62
self ._sender .send ('mamonsu.plugin.errors[]' , '' )
64
63
plugin_errors , plugin_probes = 0 , 0
You can’t perform that action at this time.
0 commit comments