send activity stream changes as raw JSON, not a JSON-ified string

see: https://github.com/ansible/awx/issues/2005
This commit is contained in:
Ryan Petrello 2018-11-06 14:17:46 -05:00
parent 856dc3645e
commit 1523feee91
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -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'])