add insights setting to metrics

This commit is contained in:
Christian Adams
2019-04-08 11:33:06 -04:00
parent 520cbd2015
commit e1c6057b4c

View File

@@ -48,7 +48,8 @@ INSTANCE_STATUS = Gauge('awx_instance_status_total', 'Status of Job launched', [
def metrics(): def metrics():
license_info = get_license(show_key=False) license_info = get_license(show_key=False)
SYSTEM_INFO.info({'system_uuid': settings.SYSTEM_UUID, SYSTEM_INFO.info({
'system_uuid': settings.SYSTEM_UUID,
'insights_analytics': str(settings.INSIGHTS_DATA_ENABLED), 'insights_analytics': str(settings.INSIGHTS_DATA_ENABLED),
'tower_url_base': settings.TOWER_URL_BASE, 'tower_url_base': settings.TOWER_URL_BASE,
'tower_version': get_awx_version(), 'tower_version': get_awx_version(),
@@ -58,7 +59,8 @@ def metrics():
'license_expiry': str(license_info.get('time_remaining', 0)), 'license_expiry': str(license_info.get('time_remaining', 0)),
'pendo_tracking': settings.PENDO_TRACKING_STATE, 'pendo_tracking': settings.PENDO_TRACKING_STATE,
'external_logger_enabled': str(settings.LOG_AGGREGATOR_ENABLED), 'external_logger_enabled': str(settings.LOG_AGGREGATOR_ENABLED),
'external_logger_type': getattr(settings, 'LOG_AGGREGATOR_TYPE', 'None')}) 'external_logger_type': getattr(settings, 'LOG_AGGREGATOR_TYPE', 'None')
})
current_counts = counts(datetime.now()) current_counts = counts(datetime.now())