From 1523feee914c4fa40285797e779dae71659aae0b Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Tue, 6 Nov 2018 14:17:46 -0500 Subject: [PATCH] send activity stream changes as raw JSON, not a JSON-ified string see: https://github.com/ansible/awx/issues/2005 --- awx/main/utils/formatters.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awx/main/utils/formatters.py b/awx/main/utils/formatters.py index f83dc3887c..409e0be62a 100644 --- a/awx/main/utils/formatters.py +++ b/awx/main/utils/formatters.py @@ -31,6 +31,10 @@ class LogstashFormatter(LogstashFormatterVersion1): to the logging receiver ''' if kind == 'activity_stream': + try: + raw_data['changes'] = json.loads(raw_data.get('changes', '{}')) + except Exception: + pass # best effort here, if it's not valid JSON, then meh return raw_data elif kind == 'system_tracking': data = copy(raw_data['ansible_facts'])