Smartctl Exporter can query smartctl on a disk an returns its status. However, smartctl returns a bitmask and PromQL doesn't have any bitwise operators, making getting a specific bits very tricky. Here's my recipe for this.
Say smartctl returned valued (rv) is 26 and we're only looking for bit 3 ("DISK FAILING"):
rv = 0b0011010 (26)
p = 2^(3+1) = 16
rv = rv % p = 0b1010 # Cuts off bits higer than fourth