1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

add insights setting to metrics

This commit is contained in:
Christian Adams 2019-04-08 11:33:06 -04:00
parent 2c8900568b
commit e2039b7d3f

View File

@ -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())