diff --git a/awx/main/analytics/metrics.py b/awx/main/analytics/metrics.py index 100b1c968f5b..9a2763d3711c 100644 --- a/awx/main/analytics/metrics.py +++ b/awx/main/analytics/metrics.py @@ -128,6 +128,7 @@ def metrics(): registry=REGISTRY, ) + LICENSE_EXPIRY = Gauge('awx_license_expiry', 'Time before AWX license expires', registry=REGISTRY) LICENSE_INSTANCE_TOTAL = Gauge('awx_license_instance_total', 'Total number of managed hosts provided by your license', registry=REGISTRY) LICENSE_INSTANCE_FREE = Gauge('awx_license_instance_free', 'Number of remaining managed hosts provided by your license', registry=REGISTRY) @@ -148,6 +149,7 @@ def metrics(): } ) + LICENSE_EXPIRY.set(str(license_info.get('time_remaining', 0))) LICENSE_INSTANCE_TOTAL.set(str(license_info.get('instance_count', 0))) LICENSE_INSTANCE_FREE.set(str(license_info.get('free_instances', 0)))