Skip to content
Merged
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
6 changes: 5 additions & 1 deletion ansible/playbooks/extra/custom_exporters/perccli.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@
"state",
"firmware",
"serial",
"manufacturer",
"type",
],
namespace=namespace,
registry=registry,
Expand Down Expand Up @@ -394,7 +396,7 @@ def create_metrics_of_physical_drive(
physical_drive, detailed_info_array, controller_index
):
enclosure, slot = physical_drive.get("EID:Slt").split(":")[:2]

type_pd = physical_drive.get("Type")
if enclosure == " ":
drive_identifier = "Drive /c{0}/s{1}".format(controller_index, slot)
enclosure = ""
Expand Down Expand Up @@ -457,6 +459,8 @@ def create_metrics_of_physical_drive(
physical_drive["State"],
attributes["Firmware Revision"].strip(),
attributes["SN"].strip(),
attributes["Manufacturer Id"].strip(),
type_pd,
).set(1)

if "Drive Temperature" in state and state["Drive Temperature"] != "N/A":
Expand Down
Loading