The dude. Configuring Toner Level Email Notifications in Network Printers

    Good day. Objective: Configure low-level mail notifications on network printers.
    Preface: there was an attempt to find such a ready-made application, a review was not made of a close look at various monitoring systems (Lansweeper, Spiceworks) in general, everything didn’t work, the Dude network and server monitoring system was already configured on The Dude, I decided to try to implement this task on it, because all components are in it.
    Solution: general scheme - The Dude polls the ink level through a snmp printer and sends a notification to the mail.
    Let's get started.
    Most of the printers on the network are Kyocera, the search engine suggested that there is a value for the current amount of toner and maximum, according to a small formula we get the percentages: oid (“”) * 100 /oid( ")
    We create a function (in the Functions section), I called it toner:

    After that we create a probe (Probe)

    Here I will explain a little, Available - if the condition is met, the service is available, in our case, the toner in the printer is more than 10%
    Error, I did not fully understand how it works, if the first condition is met, an empty string is returned and the service is considered available? (comments on this are welcome) if the condition is not met, then the string Low is returned in my case.
    The third parameter, Value, is used to plot charts.
    Add our printer to Devices, manually add the toner probe. Since SNMP is disabled in the global configuration, I MUST turn Snmp Profile into the appropriate mode (I have v1-public), otherwise the toner probe will return the Down status.

    I’ll skip the mail notification setting, everything is standard there.
    And finally, the low toner alert letter itself:

    Thank you for your attention. Comments are welcome.

    Also popular now: