Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add output frequency/current #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions sensor_upsc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
}
Expand All @@ -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)",
}
Expand Down