Redfish-Plugin: Missing parameter for PredictedMediaLifeLeftPercent for SSDs

Hello,

we ran into a problem with Cache-SSDs. Their medialife wore out a lot faster then expected and I’m missing a configurable parameter for it now. The source in 2.4.0 looks like this:

def check_redfish_drives(item: str, section: RedfishAPIData) → CheckResult:
data = None
for key in section.keys():
if item == section[key].get(“Id”, “0”) + “-” + section[key][“Name”]:
data = section.get(key, None)
break
if data is None:
return
disc_msg = (
    f"Size: {(data.get('CapacityBytes', 0) or 0) / 1024 / 1024 / 1024:0.0f}GB, "
    f"Speed {data.get('CapableSpeedGbs', 0)} Gbs"
)

if data.get("MediaType") == "SSD":
    if data.get("PredictedMediaLifeLeftPercent"):
        disc_msg = (
            f"{disc_msg}, Media Life Left: "
            f"{int(data.get('PredictedMediaLifeLeftPercent', 0))}%"
        )
        yield Metric("media_life_left", int(data.get("PredictedMediaLifeLeftPercent")))
    else:
        disc_msg = f"{disc_msg}, no SSD Media information available"

yield Result(state=State(0), summary=disc_msg)

dev_state, dev_msg = redfish_health_state(data.get("Status", {}))
yield Result(state=State(dev_state), notice=dev_msg)

Should be no problem to implement a parameter for this field?

Greetings
Stefan

Hi @StefanM !

Please consider adding this to the Ideas Portal. This way our Product team would be able to directly see the suggestion and consider it :slight_smile: