diff --git a/LibreNMS/Modules/PrinterSupplies.php b/LibreNMS/Modules/PrinterSupplies.php index daed6a8396..74393f1e6b 100644 --- a/LibreNMS/Modules/PrinterSupplies.php +++ b/LibreNMS/Modules/PrinterSupplies.php @@ -76,7 +76,7 @@ class PrinterSupplies implements Module $tags = [ 'rrd_def' => RrdDefinition::make()->addDataset('toner', 'GAUGE', 0, 20000), - 'rrd_name' => ['toner', $toner['supply_index']], + 'rrd_name' => ['toner', $toner['supply_type'], $toner['supply_index']], 'rrd_oldname' => ['toner', $toner['supply_descr']], 'index' => $toner['supply_index'], ]; diff --git a/includes/html/graphs/device/toner.inc.php b/includes/html/graphs/device/toner.inc.php index 955fa9d564..14d5b3d9c5 100644 --- a/includes/html/graphs/device/toner.inc.php +++ b/includes/html/graphs/device/toner.inc.php @@ -47,7 +47,7 @@ foreach (dbFetchRows('SELECT * FROM printer_supplies where device_id = ?', [$dev $hostname = gethostbyid($toner['device_id']); $descr = \LibreNMS\Data\Store\Rrd::safeDescr(substr(str_pad($toner['supply_descr'], 16), 0, 16)); - $rrd_filename = Rrd::name($device['hostname'], ['toner', $toner['supply_index']]); + $rrd_filename = Rrd::name($device['hostname'], ['toner', $toner['supply_type'], $toner['supply_index']]); $id = $toner['supply_id']; $rrd_options .= " DEF:toner$id=$rrd_filename:toner:AVERAGE"; diff --git a/includes/html/graphs/toner/auth.inc.php b/includes/html/graphs/toner/auth.inc.php index 7aee75a5f2..6215aa5caa 100644 --- a/includes/html/graphs/toner/auth.inc.php +++ b/includes/html/graphs/toner/auth.inc.php @@ -5,7 +5,7 @@ if (is_numeric($vars['id'])) { if (is_numeric($toner['device_id']) && ($auth || device_permitted($toner['device_id']))) { $device = device_by_id_cache($toner['device_id']); - $rrd_filename = Rrd::name($device['hostname'], ['toner', $toner['supply_index']]); + $rrd_filename = Rrd::name($device['hostname'], ['toner', $toner['supply_type'], $toner['supply_index']]); $title = generate_device_link($device); $title .= ' :: Toner :: ' . htmlentities($toner['supply_descr']);