add a unique UUID for identifying an AWX installation

This commit is contained in:
Ryan Petrello
2019-04-05 16:29:27 -04:00
parent e9f2fddc7f
commit dfd4cb55e5
6 changed files with 47 additions and 3 deletions

View File

@@ -237,6 +237,13 @@ class LogstashFormatter(LogstashFormatterBase):
fields[log_name] = getattr(settings, setting_name, None)
elif log_name == 'type':
fields[log_name] = 'other'
uuid = (
getattr(settings, 'LOG_AGGREGATOR_TOWER_UUID', None) or
getattr(settings, 'INSTALL_UUID', None)
)
if uuid:
fields['tower_uuid'] = uuid
return fields
def format(self, record):