From e2039b7d3fcc3f15838bb94ccfe82075acc81381 Mon Sep 17 00:00:00 2001 From: Christian Adams Date: Mon, 8 Apr 2019 11:33:06 -0400 Subject: [PATCH] add insights setting to metrics --- awx/main/analytics/metrics.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/awx/main/analytics/metrics.py b/awx/main/analytics/metrics.py index ee97efc695..242999bf94 100644 --- a/awx/main/analytics/metrics.py +++ b/awx/main/analytics/metrics.py @@ -48,18 +48,17 @@ INSTANCE_STATUS = Gauge('awx_instance_status_total', 'Status of Job launched', [ def metrics(): license_info = get_license(show_key=False) - SYSTEM_INFO.info({ - 'system_uuid': settings.SYSTEM_UUID, - 'tower_url_base': settings.TOWER_URL_BASE, - 'tower_version': get_awx_version(), - 'ansible_version': get_ansible_version(), - 'license_type': license_info.get('license_type', 'UNLICENSED'), - 'free_instances': str(license_info.get('free instances', 0)), - 'license_expiry': str(license_info.get('time_remaining', 0)), - 'pendo_tracking': settings.PENDO_TRACKING_STATE, - 'external_logger_enabled': str(settings.LOG_AGGREGATOR_ENABLED), - 'external_logger_type': getattr(settings, 'LOG_AGGREGATOR_TYPE', 'None') - }) + SYSTEM_INFO.info({'system_uuid': settings.SYSTEM_UUID, + 'insights_analytics': str(settings.INSIGHTS_DATA_ENABLED), + 'tower_url_base': settings.TOWER_URL_BASE, + 'tower_version': get_awx_version(), + 'ansible_version': get_ansible_version(), + 'license_type': license_info.get('license_type', 'UNLICENSED'), + 'free_instances': str(license_info.get('free instances', 0)), + 'license_expiry': str(license_info.get('time_remaining', 0)), + 'pendo_tracking': settings.PENDO_TRACKING_STATE, + 'external_logger_enabled': str(settings.LOG_AGGREGATOR_ENABLED), + 'external_logger_type': getattr(settings, 'LOG_AGGREGATOR_TYPE', 'None')}) current_counts = counts(datetime.now())