diff --git a/docker/Dockerfile b/docker/Dockerfile index 86602ce..9a17ab1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -30,5 +30,3 @@ RUN apt-get update -y \ && ln -s /usr/lib/x86_64-linux-gnu/libssl.so.3 /usr/lib/libssl.so \ && DEBIAN_FRONTEND=noninteractive apt-get install srvadmin-all -y \ && rm /usr/bin/systemctl - -ENV PATH /opt/dell/srvadmin/bin:$PATH diff --git a/redfish/rendered_rules.go b/redfish/rendered_rules.go index 327d219..063a92b 100644 --- a/redfish/rendered_rules.go +++ b/redfish/rendered_rules.go @@ -838,12 +838,12 @@ var Rules = map[string]*CollectRule{ "/CertificateService", "/EventService", "/JobService", - "/LicenseService", "/LogServices", "/SessionService", "/TaskService", "/TelemetryService", "/UpdateService", + "/LicenseService", "/Power/", "/Power#/", "/Thermal#/", @@ -985,6 +985,12 @@ var Rules = map[string]*CollectRule{ { Path: "/redfish/v1/Chassis/{chassis}/Power", PropertyRules: []*PropertyRule{ + { + Pointer: "/PowerControl/{powercontrol}/PowerConsumedWatts", + Name: "chassis_power_powercontrol_powerconsumedwatts", + Help: "", + Type: "number", + }, { Pointer: "/PowerSupplies/{powersupply}/Redundancy/{redundancy}/Status/Health", Name: "chassis_power_powersupplies_redundancy_status_health", @@ -1084,6 +1090,36 @@ var Rules = map[string]*CollectRule{ { Path: "/redfish/v1/Chassis/{chassis}/PowerSubsystem/PowerSupplies/{unit}/Metrics", PropertyRules: []*PropertyRule{ + { + Pointer: "/FrequencyHz/Reading", + Name: "chassis_powersubsystem_powersupplies_metrics_frequencyhz_reading", + Help: "", + Type: "number", + }, + { + Pointer: "/InputCurrentAmps/Reading", + Name: "chassis_powersubsystem_powersupplies_metrics_inputcurrentamps_reading", + Help: "", + Type: "number", + }, + { + Pointer: "/InputPowerWatts/Reading", + Name: "chassis_powersubsystem_powersupplies_metrics_inputpowerwatts_reading", + Help: "", + Type: "number", + }, + { + Pointer: "/InputVoltage/Reading", + Name: "chassis_powersubsystem_powersupplies_metrics_inputvoltage_reading", + Help: "", + Type: "number", + }, + { + Pointer: "/OutputPowerWatts/Reading", + Name: "chassis_powersubsystem_powersupplies_metrics_outputpowerwatts_reading", + Help: "", + Type: "number", + }, { Pointer: "/Status/Health", Name: "chassis_powersubsystem_powersupplies_metrics_status_health", @@ -1101,6 +1137,12 @@ var Rules = map[string]*CollectRule{ { Path: "/redfish/v1/Chassis/{chassis}/Sensors/{sensor}", PropertyRules: []*PropertyRule{ + { + Pointer: "/Reading", + Name: "chassis_sensors_reading", + Help: "", + Type: "number", + }, { Pointer: "/Status/Health", Name: "chassis_sensors_status_health", @@ -1113,11 +1155,41 @@ var Rules = map[string]*CollectRule{ Help: "", Type: "state", }, + { + Pointer: "/Thresholds/LowerCaution/Reading", + Name: "chassis_sensors_thresholds_lowercaution_reading", + Help: "", + Type: "number", + }, + { + Pointer: "/Thresholds/LowerCritical/Reading", + Name: "chassis_sensors_thresholds_lowercritical_reading", + Help: "", + Type: "number", + }, + { + Pointer: "/Thresholds/UpperCaution/Reading", + Name: "chassis_sensors_thresholds_uppercaution_reading", + Help: "", + Type: "number", + }, + { + Pointer: "/Thresholds/UpperCritical/Reading", + Name: "chassis_sensors_thresholds_uppercritical_reading", + Help: "", + Type: "number", + }, }, }, { Path: "/redfish/v1/Chassis/{chassis}/Thermal", PropertyRules: []*PropertyRule{ + { + Pointer: "/Fans/{fan}/Reading", + Name: "chassis_thermal_fans_reading", + Help: "", + Type: "number", + }, { Pointer: "/Fans/{fan}/Status/Health", Name: "chassis_thermal_fans_status_health", @@ -1142,6 +1214,12 @@ var Rules = map[string]*CollectRule{ Help: "", Type: "state", }, + { + Pointer: "/Temperatures/{temperature}/ReadingCelsius", + Name: "chassis_thermal_temperatures_readingcelsius", + Help: "", + Type: "number", + }, { Pointer: "/Temperatures/{temperature}/Status/Health", Name: "chassis_thermal_temperatures_status_health", @@ -1202,6 +1280,35 @@ var Rules = map[string]*CollectRule{ }, }, }, + { + Path: "/redfish/v1/Chassis/{chassis}/ThermalSubsystem/ThermalMetrics", + PropertyRules: []*PropertyRule{ + { + Pointer: "/TemperatureReadingsCelsius/{temperaturereadingscelsiu}/Reading", + Name: "chassis_thermalsubsystem_thermalmetrics_temperaturereadingscelsius_reading", + Help: "", + Type: "number", + }, + { + Pointer: "/TemperatureSummaryCelsius/Exhaust/Reading", + Name: "chassis_thermalsubsystem_thermalmetrics_temperaturesummarycelsius_exhaust_reading", + Help: "", + Type: "number", + }, + { + Pointer: "/TemperatureSummaryCelsius/Intake/Reading", + Name: "chassis_thermalsubsystem_thermalmetrics_temperaturesummarycelsius_intake_reading", + Help: "", + Type: "number", + }, + { + Pointer: "/TemperatureSummaryCelsius/Internal/Reading", + Name: "chassis_thermalsubsystem_thermalmetrics_temperaturesummarycelsius_internal_reading", + Help: "", + Type: "number", + }, + }, + }, { Path: "/redfish/v1/Fabrics/{fabric}", PropertyRules: []*PropertyRule{ @@ -1270,6 +1377,57 @@ var Rules = map[string]*CollectRule{ }, }, }, + { + Path: "/redfish/v1/Systems/System.Embedded.1/Storage/AHCI.Embedded.1-1/Controllers/AHCI.Embedded.1-1", + PropertyRules: []*PropertyRule{ + { + Pointer: "/Status/Health", + Name: "systems_systemembedded1_storage_ahciembedded11_controllers_ahciembedded11_status_health", + Help: "", + Type: "health", + }, + { + Pointer: "/Status/State", + Name: "systems_systemembedded1_storage_ahciembedded11_controllers_ahciembedded11_status_state", + Help: "", + Type: "state", + }, + }, + }, + { + Path: "/redfish/v1/Systems/System.Embedded.1/Storage/AHCI.SL.7-1/Controllers/AHCI.SL.7-1", + PropertyRules: []*PropertyRule{ + { + Pointer: "/Status/Health", + Name: "systems_systemembedded1_storage_ahcisl71_controllers_ahcisl71_status_health", + Help: "", + Type: "health", + }, + { + Pointer: "/Status/State", + Name: "systems_systemembedded1_storage_ahcisl71_controllers_ahcisl71_status_state", + Help: "", + Type: "state", + }, + }, + }, + { + Path: "/redfish/v1/Systems/System.Embedded.1/Storage/NonRAID.Slot.3-1/Controllers/NonRAID.Slot.3-1", + PropertyRules: []*PropertyRule{ + { + Pointer: "/Status/Health", + Name: "systems_systemembedded1_storage_nonraidslot31_controllers_nonraidslot31_status_health", + Help: "", + Type: "health", + }, + { + Pointer: "/Status/State", + Name: "systems_systemembedded1_storage_nonraidslot31_controllers_nonraidslot31_status_state", + Help: "", + Type: "state", + }, + }, + }, { Path: "/redfish/v1/Systems/{system}", PropertyRules: []*PropertyRule{ @@ -1357,6 +1515,53 @@ var Rules = map[string]*CollectRule{ }, }, }, + { + Path: "/redfish/v1/Systems/{system}/Memory/{memory}/MemoryMetrics", + PropertyRules: []*PropertyRule{ + { + Pointer: "/HealthData/AlarmTrips/AddressParityError", + Name: "systems_memory_memorymetrics_healthdata_alarmtrips_addressparityerror", + Help: "", + Type: "bool", + }, + { + Pointer: "/HealthData/AlarmTrips/CorrectableECCError", + Name: "systems_memory_memorymetrics_healthdata_alarmtrips_correctableeccerror", + Help: "", + Type: "bool", + }, + { + Pointer: "/HealthData/AlarmTrips/SpareBlock", + Name: "systems_memory_memorymetrics_healthdata_alarmtrips_spareblock", + Help: "", + Type: "bool", + }, + { + Pointer: "/HealthData/AlarmTrips/Temperature", + Name: "systems_memory_memorymetrics_healthdata_alarmtrips_temperature", + Help: "", + Type: "bool", + }, + { + Pointer: "/HealthData/AlarmTrips/UncorrectableECCError", + Name: "systems_memory_memorymetrics_healthdata_alarmtrips_uncorrectableeccerror", + Help: "", + Type: "bool", + }, + { + Pointer: "/HealthData/DataLossDetected", + Name: "systems_memory_memorymetrics_healthdata_datalossdetected", + Help: "", + Type: "bool", + }, + { + Pointer: "/HealthData/PredictedMediaLifeLeftPercent", + Name: "systems_memory_memorymetrics_healthdata_predictedmedialifeleftpercent", + Help: "", + Type: "number", + }, + }, + }, { Path: "/redfish/v1/Systems/{system}/NetworkInterfaces/{nic}", PropertyRules: []*PropertyRule{ @@ -1395,26 +1600,26 @@ var Rules = map[string]*CollectRule{ Path: "/redfish/v1/Systems/{system}/SimpleStorage/{controller}", PropertyRules: []*PropertyRule{ { - Pointer: "/Devices/{device}/Status/Health", - Name: "systems_simplestorage_devices_status_health", + Pointer: "/Status/Health", + Name: "systems_simplestorage_status_health", Help: "", Type: "health", }, { - Pointer: "/Devices/{device}/Status/State", - Name: "systems_simplestorage_devices_status_state", + Pointer: "/Status/State", + Name: "systems_simplestorage_status_state", Help: "", Type: "state", }, { - Pointer: "/Status/Health", - Name: "systems_simplestorage_status_health", + Pointer: "/Devices/{device}/Status/Health", + Name: "systems_simplestorage_devices_status_health", Help: "", Type: "health", }, { - Pointer: "/Status/State", - Name: "systems_simplestorage_status_state", + Pointer: "/Devices/{device}/Status/State", + Name: "systems_simplestorage_devices_status_state", Help: "", Type: "state", }, @@ -1450,25 +1655,20 @@ var Rules = map[string]*CollectRule{ }, }, { - Path: "/redfish/v1/Systems/{system}/Storage/{storage}/Controllers/{controller}", + Path: "/redfish/v1/Systems/{system}/Storage/{storage}/Drives/{device}", PropertyRules: []*PropertyRule{ { - Pointer: "/Status/Health", - Name: "systems_storage_controllers_status_health", + Pointer: "/FailurePredicted", + Name: "systems_storage_drives_failurepredicted", Help: "", - Type: "health", + Type: "bool", }, { - Pointer: "/Status/State", - Name: "systems_storage_controllers_status_state", + Pointer: "/PredictedMediaLifeLeftPercent", + Name: "systems_storage_drives_predictedmedialifeleftpercent", Help: "", - Type: "state", + Type: "number", }, - }, - }, - { - Path: "/redfish/v1/Systems/{system}/Storage/{storage}/Drives/{device}", - PropertyRules: []*PropertyRule{ { Pointer: "/Status/Health", Name: "systems_storage_drives_status_health", @@ -1529,40 +1729,6 @@ var Rules = map[string]*CollectRule{ }, }, }, - { - Path: "/redfish/v1/Systems/{system}/PCIeDevices/{device}", - PropertyRules: []*PropertyRule{ - { - Pointer: "/Status/Health", - Name: "systems_pciedevices_status_health", - Help: "", - Type: "health", - }, - { - Pointer: "/Status/State", - Name: "systems_pciedevices_status_state", - Help: "", - Type: "state", - }, - }, - }, - { - Path: "/redfish/v1/Systems/{system}/PCIeDevices/{device}/PCIeFunctions/{function}", - PropertyRules: []*PropertyRule{ - { - Pointer: "/Status/Health", - Name: "systems_pciedevices_pciefunctions_status_health", - Help: "", - Type: "health", - }, - { - Pointer: "/Status/State", - Name: "systems_pciedevices_pciefunctions_status_state", - Help: "", - Type: "state", - }, - }, - }, }, }, "dell_redfish_1.2.0.yml": { diff --git a/redfish/rules/dell_redfish_1.17.0.yml b/redfish/rules/dell_redfish_1.17.0.yml index d1f9e74..fe86dd6 100644 --- a/redfish/rules/dell_redfish_1.17.0.yml +++ b/redfish/rules/dell_redfish_1.17.0.yml @@ -7,7 +7,7 @@ Metrics: - Name: chassis_status_state Pointer: /Status/State Type: state -- Path: /redfish/v1/Chassis/{chassis}/NetworkAdapters/{nic} +- Path: /redfish/v1/Chassis/{chassis}/NetworkAdapters/{function} Properties: - Name: chassis_networkadapters_status_health Pointer: /Status/Health @@ -15,7 +15,7 @@ Metrics: - Name: chassis_networkadapters_status_state Pointer: /Status/State Type: state -- Path: /redfish/v1/Chassis/{chassis}/NetworkAdapters/{nic}/NetworkDeviceFunctions/{function} +- Path: /redfish/v1/Chassis/{chassis}/NetworkAdapters/{function}/NetworkDeviceFunctions/{nic} Properties: - Name: chassis_networkadapters_networkdevicefunctions_status_health Pointer: /Status/Health @@ -23,7 +23,7 @@ Metrics: - Name: chassis_networkadapters_networkdevicefunctions_status_state Pointer: /Status/State Type: state -- Path: /redfish/v1/Chassis/{chassis}/NetworkAdapters/{nic}/NetworkPorts/{port} +- Path: /redfish/v1/Chassis/{chassis}/NetworkAdapters/{function}/NetworkPorts/{port} Properties: - Name: chassis_networkadapters_networkports_status_health Pointer: /Status/Health @@ -62,6 +62,9 @@ Metrics: Type: state - Path: /redfish/v1/Chassis/{chassis}/Power Properties: + - Name: chassis_power_powercontrol_powerconsumedwatts + Pointer: /PowerControl/{powercontrol}/PowerConsumedWatts + Type: number - Name: chassis_power_powersupplies_redundancy_status_health Pointer: /PowerSupplies/{powersupply}/Redundancy/{redundancy}/Status/Health Type: health @@ -110,6 +113,21 @@ Metrics: Type: state - Path: /redfish/v1/Chassis/{chassis}/PowerSubsystem/PowerSupplies/{unit}/Metrics Properties: + - Name: chassis_powersubsystem_powersupplies_metrics_frequencyhz_reading + Pointer: /FrequencyHz/Reading + Type: number + - Name: chassis_powersubsystem_powersupplies_metrics_inputcurrentamps_reading + Pointer: /InputCurrentAmps/Reading + Type: number + - Name: chassis_powersubsystem_powersupplies_metrics_inputpowerwatts_reading + Pointer: /InputPowerWatts/Reading + Type: number + - Name: chassis_powersubsystem_powersupplies_metrics_inputvoltage_reading + Pointer: /InputVoltage/Reading + Type: number + - Name: chassis_powersubsystem_powersupplies_metrics_outputpowerwatts_reading + Pointer: /OutputPowerWatts/Reading + Type: number - Name: chassis_powersubsystem_powersupplies_metrics_status_health Pointer: /Status/Health Type: health @@ -118,14 +136,32 @@ Metrics: Type: state - Path: /redfish/v1/Chassis/{chassis}/Sensors/{sensor} Properties: + - Name: chassis_sensors_reading + Pointer: /Reading + Type: number - Name: chassis_sensors_status_health Pointer: /Status/Health Type: health - Name: chassis_sensors_status_state Pointer: /Status/State Type: state + - Name: chassis_sensors_thresholds_lowercaution_reading + Pointer: /Thresholds/LowerCaution/Reading + Type: number + - Name: chassis_sensors_thresholds_lowercritical_reading + Pointer: /Thresholds/LowerCritical/Reading + Type: number + - Name: chassis_sensors_thresholds_uppercaution_reading + Pointer: /Thresholds/UpperCaution/Reading + Type: number + - Name: chassis_sensors_thresholds_uppercritical_reading + Pointer: /Thresholds/UpperCritical/Reading + Type: number - Path: /redfish/v1/Chassis/{chassis}/Thermal Properties: + - Name: chassis_thermal_fans_reading + Pointer: /Fans/{fan}/Reading + Type: number - Name: chassis_thermal_fans_status_health Pointer: /Fans/{fan}/Status/Health Type: health @@ -138,6 +174,9 @@ Metrics: - Name: chassis_thermal_redundancy_status_state Pointer: /Redundancy/{redundancy}/Status/State Type: state + - Name: chassis_thermal_temperatures_readingcelsius + Pointer: /Temperatures/{temperature}/ReadingCelsius + Type: number - Name: chassis_thermal_temperatures_status_health Pointer: /Temperatures/{temperature}/Status/Health Type: health @@ -166,6 +205,20 @@ Metrics: - Name: chassis_thermalsubsystem_fans_status_state Pointer: /Status/State Type: state +- Path: /redfish/v1/Chassis/{chassis}/ThermalSubsystem/ThermalMetrics + Properties: + - Name: chassis_thermalsubsystem_thermalmetrics_temperaturereadingscelsius_reading + Pointer: /TemperatureReadingsCelsius/{temperaturereadingscelsiu}/Reading + Type: number + - Name: chassis_thermalsubsystem_thermalmetrics_temperaturesummarycelsius_exhaust_reading + Pointer: /TemperatureSummaryCelsius/Exhaust/Reading + Type: number + - Name: chassis_thermalsubsystem_thermalmetrics_temperaturesummarycelsius_intake_reading + Pointer: /TemperatureSummaryCelsius/Intake/Reading + Type: number + - Name: chassis_thermalsubsystem_thermalmetrics_temperaturesummarycelsius_internal_reading + Pointer: /TemperatureSummaryCelsius/Internal/Reading + Type: number - Path: /redfish/v1/Fabrics/{fabric} Properties: - Name: fabrics_status_health @@ -198,6 +251,30 @@ Metrics: - Name: managers_networkprotocol_status_state Pointer: /Status/State Type: state +- Path: /redfish/v1/Systems/System.Embedded.1/Storage/AHCI.Embedded.1-1/Controllers/AHCI.Embedded.1-1 + Properties: + - Name: systems_systemembedded1_storage_ahciembedded11_controllers_ahciembedded11_status_health + Pointer: /Status/Health + Type: health + - Name: systems_systemembedded1_storage_ahciembedded11_controllers_ahciembedded11_status_state + Pointer: /Status/State + Type: state +- Path: /redfish/v1/Systems/System.Embedded.1/Storage/AHCI.SL.7-1/Controllers/AHCI.SL.7-1 + Properties: + - Name: systems_systemembedded1_storage_ahcisl71_controllers_ahcisl71_status_health + Pointer: /Status/Health + Type: health + - Name: systems_systemembedded1_storage_ahcisl71_controllers_ahcisl71_status_state + Pointer: /Status/State + Type: state +- Path: /redfish/v1/Systems/System.Embedded.1/Storage/NonRAID.Slot.3-1/Controllers/NonRAID.Slot.3-1 + Properties: + - Name: systems_systemembedded1_storage_nonraidslot31_controllers_nonraidslot31_status_health + Pointer: /Status/Health + Type: health + - Name: systems_systemembedded1_storage_nonraidslot31_controllers_nonraidslot31_status_state + Pointer: /Status/State + Type: state - Path: /redfish/v1/Systems/{system} Properties: - Name: systems_hostwatchdogtimer_status_state @@ -240,6 +317,29 @@ Metrics: - Name: systems_memory_status_state Pointer: /Status/State Type: state +- Path: /redfish/v1/Systems/{system}/Memory/{memory}/MemoryMetrics + Properties: + - Name: systems_memory_memorymetrics_healthdata_alarmtrips_addressparityerror + Pointer: /HealthData/AlarmTrips/AddressParityError + Type: bool + - Name: systems_memory_memorymetrics_healthdata_alarmtrips_correctableeccerror + Pointer: /HealthData/AlarmTrips/CorrectableECCError + Type: bool + - Name: systems_memory_memorymetrics_healthdata_alarmtrips_spareblock + Pointer: /HealthData/AlarmTrips/SpareBlock + Type: bool + - Name: systems_memory_memorymetrics_healthdata_alarmtrips_temperature + Pointer: /HealthData/AlarmTrips/Temperature + Type: bool + - Name: systems_memory_memorymetrics_healthdata_alarmtrips_uncorrectableeccerror + Pointer: /HealthData/AlarmTrips/UncorrectableECCError + Type: bool + - Name: systems_memory_memorymetrics_healthdata_datalossdetected + Pointer: /HealthData/DataLossDetected + Type: bool + - Name: systems_memory_memorymetrics_healthdata_predictedmedialifeleftpercent + Pointer: /HealthData/PredictedMediaLifeLeftPercent + Type: number - Path: /redfish/v1/Systems/{system}/NetworkInterfaces/{nic} Properties: - Name: systems_networkinterfaces_status_health @@ -284,16 +384,14 @@ Metrics: - Name: systems_storage_storagecontrollers_status_state Pointer: /StorageControllers/{storagecontroller}/Status/State Type: state -- Path: /redfish/v1/Systems/{system}/Storage/{storage}/Controllers/{controller} - Properties: - - Name: systems_storage_controllers_status_health - Pointer: /Status/Health - Type: health - - Name: systems_storage_controllers_status_state - Pointer: /Status/State - Type: state - Path: /redfish/v1/Systems/{system}/Storage/{storage}/Drives/{device} Properties: + - Name: systems_storage_drives_failurepredicted + Pointer: /FailurePredicted + Type: bool + - Name: systems_storage_drives_predictedmedialifeleftpercent + Pointer: /PredictedMediaLifeLeftPercent + Type: number - Name: systems_storage_drives_status_health Pointer: /Status/Health Type: health @@ -322,22 +420,6 @@ Metrics: - Name: systems_storage_volumes_status_state Pointer: /Status/State Type: state -- Path: /redfish/v1/Systems/{system}/PCIeDevices/{device} - Properties: - - Name: systems_pciedevices_status_health - Pointer: /Status/Health - Type: health - - Name: systems_pciedevices_status_state - Pointer: /Status/State - Type: state -- Path: /redfish/v1/Systems/{system}/PCIeDevices/{device}/PCIeFunctions/{function} - Properties: - - Name: systems_pciedevices_pciefunctions_status_health - Pointer: /Status/Health - Type: health - - Name: systems_pciedevices_pciefunctions_status_state - Pointer: /Status/State - Type: state Traverse: Excludes: - /JsonSchemas @@ -353,12 +435,12 @@ Traverse: - /CertificateService - /EventService - /JobService - - /LicenseService - /LogServices - /SessionService - /TaskService - /TelemetryService - /UpdateService + - /LicenseService - /Power/ - /Power#/ - /Thermal#/