Encode and decode ID's in generic-munin
This commit is contained in:
parent
69da2c5d99
commit
be1f8707ff
1 changed files with 2 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ class GenericMuninPlugin(object):
|
||||||
self.object_list = os.environ["get_object_list"]
|
self.object_list = os.environ["get_object_list"]
|
||||||
self.tomonitore = None
|
self.tomonitore = None
|
||||||
if 'id_monitored' in os.environ:
|
if 'id_monitored' in os.environ:
|
||||||
self.tomonitore = os.environ['id_monitored'].split(' ')
|
self.tomonitore = os.environ['id_monitored'].decode('utf-8').split(' ')
|
||||||
self.exclude = None
|
self.exclude = None
|
||||||
if 'exclude' in os.environ:
|
if 'exclude' in os.environ:
|
||||||
self.exclude = os.environ['exclude'].split(' ')
|
self.exclude = os.environ['exclude'].split(' ')
|
||||||
|
|
@ -263,7 +263,7 @@ class GenericMuninPlugin(object):
|
||||||
if self.monitored(result):
|
if self.monitored(result):
|
||||||
value = self.get_value(result)
|
value = self.get_value(result)
|
||||||
if value is not NotAvailable:
|
if value is not NotAvailable:
|
||||||
self.write_output('%s.value %f' % (self.result2id(result), value))
|
self.write_output('%s.value %f' % (self.result2id(result).encode('iso-8859-15'), value))
|
||||||
except CallErrors, errors:
|
except CallErrors, errors:
|
||||||
self.print_errors(errors)
|
self.print_errors(errors)
|
||||||
self.print_cache(self.name)
|
self.print_cache(self.name)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue