False Alerts firing starting at 7am

I came into work this morning with a bunch of printer toner level alerts Im not sure why they are going off any ideas?

They always worked correctly until this morning.

Alert Rule: Fires if toner level is at 2% or less

SELECT * FROM toner,devices WHERE (( devices.device_id = toner.device_id ) && toner.device_id = ?) && (toner.toner_current <= 2 && devices.type = "Printer" )

Device Triggering Alert:

As you can see there is no toner level below 2, was there a change where it would see 20 as equivalent to 2?

Since this is a new problem, it could somehow be related to the last LibreNMS commit (13 hours ago) , which is Toner related https://github.com/librenms/librenms/pull/9859

Do I need to wait for another update or is this something I can fix? As far as I know I’m not part of testing.

if you are with daily updates (master) yes, you are on “testing”.

Check https://docs.librenms.org/General/Releases/

For the other, yes you need to wait for a fix

This isn’t enough info. Can you run that sql query and paste the output?

I am seeing the same problem and it turns out that the poller is now watching paper try levels and attributing them to toner.toner_current. I was able to ignore these in my alerts by adding in toner.toner_desc doesn’t contain %Tray% (or in some cases %Stack% or %Drawer%)

Yay that we are watching paper levels… but not sure yet how I will handle keeping paper trays full… :wink:

1 Like

That’s also what I’m seeing Ill add they doesn’t contain statement thanks guys.

My inbox got flooded since this recent update as well due to a false report on all our printers:

This is a new state that seems to have been detected after this new version.

State sensors are working for me. You should check your printers or perhaps they report the snmpget data badly.

For those that want to ignore trays, you can update your alert rule to check toner_type is not “input”. toner_type should now be set correctly for all entries.

2 Likes

I should have said that I’ve never been alerted for the state of my printers until this morning. I’ll have to change the ‘State Sensor Critical’ alert to ignore Printers now.

To be more specific, if you are setting alert on your toner level for the printers it looks like you should define what it is you want to alert on rather than what it is you don’t want to… that way if something new appears under the toner table we don’t get alerted.

So you would want to set your alerts to require toner.toner_type to be equal to either “tonerCartridge” or “toner”.

Noting also that you can separately alert on when your “fuser” needs a new maintenance kit.

Here is some mysql output on toner from three printers in my setup:

MariaDB [librenms]> select toner_type, toner_descr from toner;
+----------------+----------------------------------+
| toner_type     | toner_descr                      |
+----------------+----------------------------------+
| tonerCartridge | Black Cartridge 81X HP CF281X.   |
| fuser          | Maintenance Kit HP 110V-F2G76A,  |
| input          | Tray 1                           |
| input          | Tray 2                           |
| input          | Tray 3                           |
| input          | Tray 4                           |
| toner          | Black Cartridge HP CE410X        |
| toner          | Cyan Cartridge HP CE411A         |
| toner          | Magenta Cartridge HP CE413A      |
| toner          | Yellow Cartridge HP CE412A       |
| input          | Tray 2                           |
| toner          | Canon GPR-38 Black Toner         |
| input          | Stack Bypass                     |
| input          | Drawer 1                         |
| input          | Drawer 2                         |
| input          | Drawer 3                         |
| input          | Drawer 4                         |
+----------------+----------------------------------+
19 rows in set (0.00 sec)

Its a small thing for us to replace toner and fuser kits before they run out. But you stick a lot of small things together and it means business runs smoother. Still not sure I want paper tray alerts though - perhaps when we have large after hours runs we can set up an alert for those who manage it.

I will do a seperate write up for those who might want to monitor and alert for toner/fuser replacement.

Stick it under “General”?

Thanks, it would be great to put some printer supplies alert rules in the alert rule collection. Do you have some that work?

For alerting on Toner:

SELECT * FROM devices,toner WHERE (devices.device_id = ? AND devices.device_id = toner.device_id) AND toner.toner_current <= 2 AND toner.toner_type != “input” AND toner.toner_type != “fuser”

Per my previous post you could explicitly say toner.toner_type = “toner” but you might need to use toner.toner_type = “tonerCartridge” depending on what the reporting printer uses. We have two different HP printers, one reports on “toner”, the other reports on “tonerCartridge” :roll_eyes:

If you wanted to alert on the Maintenance Kit (“fuser”) running low it would be:

SELECT * FROM devices,toner WHERE (devices.device_id = ? AND devices.device_id = toner.device_id) AND toner.toner_type = “fuser” AND toner.toner_current <= 1

Our Alerting Template for Toner comes out rather nicely too:

<div style="font-family:Helvetica;">
@if ($alert->state == 1) <span style="color:DarkOrchid;">{{ $alert->severity }} @endif 
@if ($alert->state == 2) <span style="color:goldenrod;">Low Toner Acknowledged @endif 
@if ($alert->state == 3) <span style="color:DarkKhaki;">Low Toner Recovering @endif 
@if ($alert->state == 0) <span style="color:green;">Toner Replaced @endif 
</span></b>
<br><br>
@if ($alert->faults) 
<table border="1" width="60%">
        <col style="width:40%">
	<col style="width:10%">
	<col style="width:10%">
<thead>
	<tr>
		<th>Printer Name</th>
		<th>Toner</th>
		<th>Toner Available</th>
	</tr>
	</thead>
	<tbody>
	@foreach ($alert->faults as $key => $value)
		<tr>
			@if ($alert->transport == mail) 
				<td align="center"><a href="http://librenms/device/device={{ $alert->hostname }}/">{{ $alert->hostname }}</a></td>
			 @else 
				<td align="center">{{ $alert->hostname }}</td>
			 @endif 
				<td align="center"><font color=orange>{{ $value['toner_descr'] }}</td>
			@if ($alert->state == 1) 
				<td align="center"><font color=red>{{ $value['toner_current'] }}%</td>
			 @else 
				<td align="center"><font color=green>{{ $value['toner_current'] }}%</td>
			 @endif 
			<font color=black>
		</tr>
	 @endforeach 	
	</tbody>

</table><br>
@if ($alert->location) 
<b>Location:</b> {{ $alert->location }}<br>
 @else 
<b>Location:</b> LOCATION NOT DEFINED YET!!<br>
 @endif <br>
@if ($alert->Notes) 
<b>Notes:</b> {{ $alert->notes }}<br>
 @endif 
<b>Uptime:</b> {{ $alert->uptime_long }}<br>
<b>Duration:</b> {{ $alert->elapsed }}<br>
@if ($alert->description) 
<b>Description:</b> {{ $alert->description }}<br>
 @endif 
@foreach ($alert->faults as $key => $value)
<br><br>
<img src="http://librenms/graph.php?width=459&height=213&lazy_w=552&from=end-30d&device={{ $value['device_id'] }}&type=device_toner&legend=yes"><br>
<b>Device: </b>{{ $value['sysDescr'] }}<br><br>
 @endforeach 
 @endif 
<br>
<b>Alerts sent to:</b> @foreach ($alert->contacts as $key => $value){{ $value }} <{{ $key }}>  @endforeach  <br>
2 Likes