From 8d626d9f2488339173cb062f2565e7167c2c0639 Mon Sep 17 00:00:00 2001 From: Peter Fern Date: Fri, 14 Dec 2018 19:36:33 +1100 Subject: [PATCH] Add output frequency/current --- sensor_upsc/main.go | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/sensor_upsc/main.go b/sensor_upsc/main.go index 6680b04..50abcf1 100644 --- a/sensor_upsc/main.go +++ b/sensor_upsc/main.go @@ -71,14 +71,16 @@ type Sensor struct { // expose it. Please also add a TYPE and HELP entry. var ( upscVarFloat = map[string]string{ - "battery.charge": "upsc_battery_charge", - "battery.voltage": "upsc_battery_voltage", - "input.frequency": "upsc_input_frequency", - "input.voltage": "upsc_input_voltage", - "input.current": "upsc_input_current", - "output.voltage": "upsc_output_voltage", - "ups.load": "upsc_ups_load", - "ups.temperature": "upsc_ups_temperature", + "battery.charge": "upsc_battery_charge", + "battery.voltage": "upsc_battery_voltage", + "input.frequency": "upsc_input_frequency", + "input.voltage": "upsc_input_voltage", + "input.current": "upsc_input_current", + "output.voltage": "upsc_output_voltage", + "output.frequency": "upsc_output_frequency", + "output.current": "upsc_output_current", + "ups.load": "upsc_ups_load", + "ups.temperature": "upsc_ups_temperature", } sensorsType = []string{ "# TYPE upsc_battery_charge gauge", @@ -87,6 +89,8 @@ var ( "# TYPE upsc_input_voltage gauge", "# TYPE upsc_input_current gauge", "# TYPE upsc_output_voltage gauge", + "# TYPE upsc_output_frequency gauge", + "# TYPE upsc_output_currency gauge", "# TYPE upsc_ups_load gauge", "# TYPE upsc_ups_temperature gauge", } @@ -97,6 +101,8 @@ var ( "# HELP upsc_input_voltage Input voltage (V)", "# HELP upsc_input_current Input current (A)", "# HELP upsc_output_voltage Output voltage (V)", + "# HELP upsc_output_frequency Output frequency (Hz)", + "# HELP upsc_output_current Output current (A)", "# HELP upsc_ups_load Load on UPS (percent)", "# HELP upsc_ups_temperature UPS temperature (degrees C)", }