We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3affdd7 + 0022a01 commit e82ab25Copy full SHA for e82ab25
elastalert/alerts.py
@@ -918,10 +918,10 @@ def alert(self, matches):
918
919
if self.rule.get('pipe_match_json'):
920
match_json = json.dumps(matches, cls=DateTimeEncoder) + '\n'
921
- stdout, stderr = subp.communicate(input=match_json)
+ stdout, stderr = subp.communicate(input=match_json.encode())
922
elif self.rule.get('pipe_alert_text'):
923
alert_text = self.create_alert_body(matches)
924
- stdout, stderr = subp.communicate(input=alert_text)
+ stdout, stderr = subp.communicate(input=alert_text.encode())
925
if self.rule.get("fail_on_non_zero_exit", False) and subp.wait():
926
raise EAException("Non-zero exit code while running command %s" % (' '.join(command)))
927
except OSError as e:
0 commit comments