Skip to content

Commit

Permalink
Merge pull request #107 from Comcast/update_moonshot_metricnames
Browse files Browse the repository at this point in the history
set generic metric names from moonshot exporter
  • Loading branch information
ibrahimkk-moideen authored Nov 13, 2024
2 parents 7874c85 + 5b0aef9 commit 1334ca7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ log is based on the [Keep a CHANGELOG](http://keepachangelog.com/) project.
## Updated

- increase security context for kubernetes helm chart deployment [#102](https://github.com/Comcast/fishymetrics/issues/102)
- metric names in moonshot exporter to generic names as seen in other models [#106](https://github.com/Comcast/fishymetrics/issues/106)

## [0.12.1]

Expand Down
24 changes: 12 additions & 12 deletions exporter/moonshot/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,30 @@ func NewDeviceMetrics() *map[string]*metrics {
}

ThermalMetrics = &metrics{
"fanSpeed": newServerMetric("thermal_fan_speed", "Current fan speed in the unit of percentage, possible values are 0 - 100", nil, []string{"name"}),
"fanStatus": newServerMetric("thermal_fan_status", "Current fan status 1 = OK, 0 = BAD", nil, []string{"name"}),
"sensorTemperature": newServerMetric("thermal_sensor_temperature", "Current sensor temperature reading in Celsius", nil, []string{"name"}),
"sensorStatus": newServerMetric("thermal_sensor_status", "Current sensor status 1 = OK, 0 = BAD", nil, []string{"name"}),
"fanSpeed": newServerMetric("redfish_thermal_fan_speed", "Current fan speed in the unit of percentage, possible values are 0 - 100", nil, []string{"name"}),
"fanStatus": newServerMetric("redfish_thermal_fan_status", "Current fan status 1 = OK, 0 = BAD", nil, []string{"name"}),
"sensorTemperature": newServerMetric("redfish_thermal_sensor_temperature", "Current sensor temperature reading in Celsius", nil, []string{"name"}),
"sensorStatus": newServerMetric("redfish_thermal_sensor_status", "Current sensor status 1 = OK, 0 = BAD", nil, []string{"name"}),
}

PowerMetrics = &metrics{
"supplyOutput": newServerMetric("power_supply_output", "Power supply output in watts", nil, []string{"name", "sparePartNumber"}),
"supplyStatus": newServerMetric("power_supply_status", "Current power supply status 1 = OK, 0 = BAD", nil, []string{"name", "sparePartNumber"}),
"supplyTotalConsumed": newServerMetric("power_supply_total_consumed", "Total output of all power supplies in watts", nil, []string{}),
"supplyTotalCapacity": newServerMetric("power_supply_total_capacity", "Total output capacity of all the power supplies", nil, []string{}),
"supplyOutput": newServerMetric("redfish_power_supply_output", "Power supply output in watts", nil, []string{"name", "sparePartNumber"}),
"supplyStatus": newServerMetric("redfish_power_supply_status", "Current power supply status 1 = OK, 0 = BAD", nil, []string{"name", "sparePartNumber"}),
"supplyTotalConsumed": newServerMetric("redfish_power_supply_total_consumed", "Total output of all power supplies in watts", nil, []string{}),
"supplyTotalCapacity": newServerMetric("redfish_power_supply_total_capacity", "Total output capacity of all the power supplies", nil, []string{}),
}

SwitchMetrics = &metrics{
"moonshotSwitchStatus": newServerMetric("moonshot_switch_status", "Current Moonshot switch status 1 = OK, 0 = BAD", nil, []string{"name", "serialNumber"}),
"moonshotSwitchStatus": newServerMetric("redfish_moonshot_switch_status", "Current Moonshot switch status 1 = OK, 0 = BAD", nil, []string{"name", "serialNumber"}),
}

SwitchThermalMetrics = &metrics{
"moonshotSwitchSensorTemperature": newServerMetric("moonshot_switch_thermal_sensor_temperature", "Current sensor temperature reading in Celsius", nil, []string{"name"}),
"moonshotSwitchSensorStatus": newServerMetric("moonshot_switch_thermal_sensor_status", "Current sensor status 1 = OK, 0 = BAD", nil, []string{"name"}),
"moonshotSwitchSensorTemperature": newServerMetric("redfish_moonshot_switch_thermal_sensor_temperature", "Current sensor temperature reading in Celsius", nil, []string{"name"}),
"moonshotSwitchSensorStatus": newServerMetric("redfish_moonshot_switch_thermal_sensor_status", "Current sensor status 1 = OK, 0 = BAD", nil, []string{"name"}),
}

SwitchPowerMetrics = &metrics{
"moonshotSwitchSupplyOutput": newServerMetric("moonshot_switch_power_supply_output", "Power supply output in watts", nil, []string{"name"}),
"moonshotSwitchSupplyOutput": newServerMetric("redfish_moonshot_switch_power_supply_output", "Power supply output in watts", nil, []string{"name"}),
}

Metrics = &map[string]*metrics{
Expand Down

0 comments on commit 1334ca7

Please sign in to comment.