Device alias returning UTF-16 encoded string
Closed this issue · 0 comments
road-cycling commented
Problem devices are returning byte strings containing UTF-16 characters when queried for their alias/description.
Updating the plugin_polling_device_interface_metrics.py file with the following changes will cause python to ignore the problem characters.
return self.enrichment.get_enrichment_value(u'self', u'interface', interface_index) \
.get(u'alias') \
.encode(u'ascii', u'ignore')
def get_description(self, interface_index):
return self.enrichment.get_enrichment_value(u'self', u'interface', interface_index) \
.get(u'description') \
.encode(u'ascii', u'ignore')