diff --git a/mktxp/collector/health_collector.py b/mktxp/collector/health_collector.py index 4c77494..49b510b 100644 --- a/mktxp/collector/health_collector.py +++ b/mktxp/collector/health_collector.py @@ -21,11 +21,20 @@ class HealthCollector(BaseCollector): ''' @staticmethod def collect(router_entry): - health_labels = ['voltage', 'temperature'] + health_labels = ['voltage', 'temperature', 'cpu_temperature', 'fan1_speed', 'fan2_speed'] health_records = HealthMetricsDataSource.metric_records(router_entry, metric_labels = health_labels) if health_records: voltage_metrics = BaseCollector.gauge_collector('system_routerboard_voltage', 'Supplied routerboard voltage', health_records, 'voltage') yield voltage_metrics - temperature_metrics = BaseCollector.gauge_collector('system_routerboard_temperature', ' Routerboard current temperature', health_records, 'temperature') + temperature_metrics = BaseCollector.gauge_collector('system_routerboard_temperature', 'Routerboard current temperature', health_records, 'temperature') yield temperature_metrics + + cpu_temperature_metrics = BaseCollector.gauge_collector('system_cpu_temperature', 'CPU current temperature', health_records, 'cpu_temperature') + yield cpu_temperature_metrics + + fan_one_speed_metrics = BaseCollector.gauge_collector('system_fan_one_speed', 'System fan 1 current speed', health_records, 'fan1_speed') + yield fan_one_speed_metrics + + fan_two_speed_metrics = BaseCollector.gauge_collector('system_fan_two_speed', 'System fan 2 current speed', health_records, 'fan2_speed') + yield fan_two_speed_metrics