snmp monitoring of printers in The Dude

Snmp

There are many instructions online on how to install the monitoring server The Dude from Mikrotik. Currently, the monitoring server package is available only for RouterOS. I used version 4.0 for Windows.

snmp monitoring of printers in The Dude

Here, I wanted to discuss how to monitor printers on the network: track toner levels, and alert when the toner is out. Starting:

snmp monitoring of printers in The Dude

Click to connect:

snmp monitoring of printers in The Dude

Click to add a device (red plus) and enter the printer's IP address:

snmp monitoring of printers in The Dude

On the next step, click discovery; it finds all available probes, then click finish:

snmp monitoring of printers in The Dude

Double-click on the appeared icon to open settings, select 'printer' type, and click 'ok':

snmp monitoring of printers in The Dude

Right-click on the icon and select view:

snmp monitoring of printers in The Dude

In the label field, enter the OIDs:
[Device.Name] – device name
[oid("1.3.6.1.2.1.43.5.1.1.16.1")] – printer model
[oid("1.3.6.1.2.1.43.11.1.1.6.1.1")] – cartridge type
[oid("1.3.6.1.2.1.43.11.1.1.9.1.1")] – toner level
In the image tab, you can attach your icon:

snmp monitoring of printers in The Dude

Exiting, it looks like this:

snmp monitoring of printers in The Dude

Not all printers show oid("1.3.6.1.2.1.43.11.1.1.9.1.1") directly as the toner level; on some, this parameter indicates how many pages are left to print. To calculate the toner level, you need to divide how many pages are left to print by the total cartridge resource and multiply by 100. For this, select 'view' again, then Functions:

snmp monitoring of printers in The Dude

Click to create a new function (red plus):

snmp monitoring of printers in The Dude

I named the function toner:

snmp monitoring of printers in The Dude

In the code field, enter the formula and save:

round(100*oid("1.3.6.1.2.1.43.11.1.1.9.1.1")/oid("1.3.6.1.2.1.43.11.1.1.8.1.1"))

In the label, replace [oid("1.3.6.1.2.1.43.11.1.1.9.1.1")] with the function call [toner()]

snmp monitoring of printers in The Dude

Exiting. It looks like this:

snmp monitoring of printers in The Dude

To find the necessary OIDs and define the required parameters, you can use the snmp walk function; right-click on the printer – Snmp walk tools:

snmp monitoring of printers in The Dude

It will display the printer's object tree:

snmp monitoring of printers in The Dude

Right-click on the needed item and click copy OID.

Notifications

Now let's set up notifications for events (cartridge is empty). Open the printer, go to the services tab, click the plus (add new service):

snmp monitoring of printers in The Dude

In the probe field, click the three dots to select the required probe:

snmp monitoring of printers in The Dude

We will create our own probe, click the red plus:

snmp monitoring of printers in The Dude

I named it toner, select SNMP as type, default agent, default Snmp profile,
Enter the OID that corresponds to the toner level 1.3.6.1.2.1.43.11.1.1.9.1.1, type OID Integer, comparison method >= 1

snmp monitoring of printers in The Dude

We save and in the probe field select the toner we just created; in the alerts tab, we can set which alerts we want to receive and save them:

snmp monitoring of printers in The Dude

For demonstration, I chose that the toner level should not be below 80, and the printer turned red:

snmp monitoring of printers in The Dude

snmp monitoring of printers in The Dude

Source: habr.com

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster