Closed Cryjack closed 3 years ago
nice, thanks :) You can also replace this line:
if ($consumable =~ m/CE/) { $consumable = "Black Toner"; }
with this:
if ($consumable =~ m/CE/) {
if ($consumable =~ /1A$/) { $consumable = "Cyan Toner"; }
elsif ($consumable =~ /3A$/) { $consumable = "Magenta Toner"; }
elsif ($consumable =~ /2A$/) { $consumable = "Yellow Toner"; }
elsif ($consumable =~ /0A$/) { $consumable = "Black Toner"; }
else { $consumable = "Black Toner"; }
}
This should cover future color printers that have this same issue. Thanks!
For consumables it tells: CRITICAL: CE278A is at 0% remaining.
Here is a working patch for it. Maybe you can adjust to fit into your code.
check_snmp_printer.txt