Kaynağa Gözat

AMBARI-25469: Bad UTF encoding on Alert listener receiver (#3527)

Yu Hou 3 yıl önce
ebeveyn
işleme
dbd2f46ee1

+ 1 - 0
ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py

@@ -186,6 +186,7 @@ class BaseAlert(object):
       data['text'] = "There is a problem with the alert definition: {0}".format(str(exception))
     finally:
       # put the alert into the collector so it can be collected on the next run
+      data['text'] = data['text'].replace('\x00', '')
       self.collector.put(self.cluster_name, data)