This is an automated email from the ASF dual-hosted git repository.

wuzhiguo pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new dbd2f46ee1 AMBARI-25469: Bad UTF encoding on Alert listener receiver 
(#3527)
dbd2f46ee1 is described below

commit dbd2f46ee17e7474911549e232ce3df8041a508a
Author: Yu Hou <[email protected]>
AuthorDate: Thu Nov 17 17:21:09 2022 +0800

    AMBARI-25469: Bad UTF encoding on Alert listener receiver (#3527)
---
 ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py 
b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py
index 7b498c2413..5ed2d1f866 100644
--- a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py
+++ b/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)
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to