Automated ordering of consumables

From OpenNMS
Jump to navigation Jump to search
Tested for Versions
The instructions in this article have been tested against the following versions of OpenNMS.
Tested Against:
Version 1.12.8 tested by Fuhrmann
Version 1.12.9 tested by Fuhrmann
Version 14.0.0 tested by Fuhrmann
Version 15.0.0 tested by Fuhrmann
Version 16.0.0 tested by Fuhrmann


A self-sufficient printer environment

Prologue

This article isn't a step by step tutorial but it contains a full working configure set. You will definitely need some OpenNMS experience to implement or understand it. So feel free to adapt or improve it.

OpenNMS usually stands for network and server monitoring. But like every good tool you can use (or misuse?!) OpenNMS in other scenarios as well.

If that is a good solution, is completely your choice!

Objective

Imagine, you have a big printer environment, distributed in different locations and you don't want to order toner cadridges for every device manually.

So the goal is to let OpenNMS do that job for you!

The configuration for this is quite simple and adaptable. It shows a full working configuration with Kyocera Mita FS1128 (b/w) and Konica Minolta Bizhub C35 (color) printers. Every time toner levels are below 30% OpenNMS will order a compatible toner cartridge for each printer.

Problems / Challenge

  • The printers have to provide snmp data. In some cases the datacollection must be enhanced. For example: http://issues.opennms.org/browse/NMS-5781
  • Some OpenNMS default automated processes like cleanups and acknowledges
  • Avoid redundant configuration
  • Keep it simple/adaptable

Configuration: Ordering toner cartridges

Asset fields

All nodes need some filled asset fields. It's important because they are used for the notifications. Similarly important are the categories. One category for the notification filter (NameOf...Vendor) and the other for thresholding (TH-TONER-...).

<node foreign-id="101prt01" node-label="101prt01">
 <interface ip-addr="172.27.25.171" snmp-primary="P">
  <monitored-service service-name="SNMP"/>
 </interface>
 <category name="NameOfKyoceraSupplyVendor"/>
 <category name="TH-TONER-Kyocera1128"/>
 <category name="poll-5min"/>
 <asset name="manufacturer" value="Kyocera Mita"/>
 <asset name="zip" value="38118"/>
 <asset name="serialNumber" value="QRD0X12345"/>
 <asset name="address1" value="Braunschweig Street 111"/>
 <asset name="department" value="My Company"/>
 <asset name="city" value="Braunschweig"/>
 <asset name="division" value="Office Braunschweig"/>
 <asset name="modelNumber" value="FS-1128 MFP"/>
</node>
<node foreign-id="106prt02" node-label="106prt02">
 <interface ip-addr="172.27.26.210" snmp-primary="P">
  <monitored-service service-name="SNMP"/>
 </interface>
 <category name="NameOfKonicaSupplyVendor"/>
 <category name="TH-TONER-KonicaBizhubC35"/>
 <category name="poll-5min"/>
 <asset name="city" value="Hannover"/>
 <asset name="serialNumber" value="A123456789123"/>
 <asset name="zip" value="30165"/>
 <asset name="department" value="My Company"/>
 <asset name="modelNumber" value="Bizhub C35"/>
 <asset name="manufacturer" value="Konica Minolta"/>
 <asset name="division" value="Office Hannover"/>
 <asset name="address1" value="Hannover Street 111"/>
</node>

Custom events

We don't want automaticly created threshold (low/full) events. So we created our own events. Also we need a specific order-event to generate a order notification.

<event>
  <uei>uei.opennms.org/custom/mfp/kyocera/toner/tk130/low</uei>
  <event-label>User-defined threshold event uei.opennms.org/custom/mfp/kyocera/toner/tk130/low</event-label>
  <descr>Threshold exceeded for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</descr>
  <logmsg dest="logndisplay">Threshold exceeded for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</logmsg>
  <severity>Warning</severity>
</event>
<event>
  <uei>uei.opennms.org/custom/mfp/kyocera/toner/tk130/full</uei>
  <event-label>User-defined threshold event uei.opennms.org/custom/mfp/kyocera/toner/tk130/full</event-label>
  <descr>Threshold rearmed for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</descr>
  <logmsg dest="logndisplay">Threshold rearmed for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</logmsg>
  <severity>Warning</severity>
</event>
<event>
  <uei>uei.opennms.org/custom/mfp/kyocera/toner/tk130/order</uei>
  <event-label>User defined threshold event: Kyocera Toner TK130 Order</event-label>
  <descr>Tonerbestellung: %nodelabel%</descr>
  <logmsg dest="logndisplay">%parm[all]%</logmsg>
  <severity>Normal</severity>
</event>
<event>
  <uei>uei.opennms.org/custom/mfp/konica/toner/tnp22m/order</uei>
  <event-label>User defined threshold event:  Konica Toner TNP22M Order</event-label>
  <descr>Tonerbestellung: %nodelabel%</descr>
  <logmsg dest="logndisplay">%parm[all]%</logmsg>
  <severity>Normal</severity>
</event>
<event>
  <uei>uei.opennms.org/custom/mfp/konica/toner/tnp22c/order</uei>
  <event-label>User defined threshold event:  Konica Toner TNP22C Order</event-label>
  <descr>Tonerbestellung: %nodelabel%</descr>
  <logmsg dest="logndisplay">%parm[all]%</logmsg>
  <severity>Normal</severity>
</event>
<event>
  <uei>uei.opennms.org/custom/mfp/konica/toner/tnp22y/order</uei>
  <event-label>User defined threshold event:  Konica Toner TNP22Y Order</event-label>
  <descr>Tonerbestellung: %nodelabel%</descr>
  <logmsg dest="logndisplay">%parm[all]%</logmsg>
  <severity>Normal</severity>
</event>
<event>
  <uei>uei.opennms.org/custom/mfp/konica/toner/tnp22k/order</uei>
  <event-label>User defined threshold event:  Konica Toner TNP22K Order</event-label>
  <descr>Tonerbestellung: %nodelabel%</descr>
  <logmsg dest="logndisplay">%parm[all]%</logmsg>
  <severity>Normal</severity>
</event>
<event>
  <uei>uei.opennms.org/custom/mfp/konica/toner/tnp22y/low</uei>
  <event-label>User-defined threshold event uei.opennms.org/custom/mfp/konica/toner/tnp22y/low</event-label>
  <descr>Threshold exceeded for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</descr>
  <logmsg dest="logndisplay">Threshold exceeded for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</logmsg>
  <severity>Warning</severity>
</event>
<event>
  <uei>uei.opennms.org/custom/mfp/konica/toner/tnp22y/full</uei>
  <event-label>User-defined threshold event uei.opennms.org/custom/mfp/konica/toner/tnp22y/full</event-label>
  <descr>Threshold rearmed for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</descr>
  <logmsg dest="logndisplay">Threshold rearmed for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</logmsg>
  <severity>Warning</severity>
</event>
<event>
  <uei>uei.opennms.org/custom/mfp/konica/toner/tnp22k/low</uei>
  <event-label>User-defined threshold event uei.opennms.org/custom/mfp/konica/toner/tnp22k/low</event-label>
  <descr>Threshold exceeded for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</descr>
  <logmsg dest="logndisplay">Threshold exceeded for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</logmsg>
  <severity>Warning</severity>
</event>
<event>
  <uei>uei.opennms.org/custom/mfp/konica/toner/tnp22k/full</uei>
  <event-label>User-defined threshold event uei.opennms.org/custom/mfp/konica/toner/tnp22k/full</event-label>
  <descr>Threshold rearmed for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</descr>
  <logmsg dest="logndisplay">Threshold rearmed for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</logmsg>
  <severity>Warning</severity>
</event>
<event>
  <uei>uei.opennms.org/custom/mfp/konica/toner/tnp22m/low</uei>
  <event-label>User-defined threshold event uei.opennms.org/custom/mfp/konica/toner/tnp22m/low</event-label>
  <descr>Threshold exceeded for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</descr>
  <logmsg dest="logndisplay">Threshold exceeded for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</logmsg>
  <severity>Warning</severity>
</event>
<event>
  <uei>uei.opennms.org/custom/mfp/konica/toner/tnp22m/full</uei>
  <event-label>User-defined threshold event uei.opennms.org/custom/mfp/konica/toner/tnp22m/full</event-label>
  <descr>Threshold rearmed for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</descr>
  <logmsg dest="logndisplay">Threshold rearmed for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</logmsg>
  <severity>Warning</severity>
</event>
<event>
  <uei>uei.opennms.org/custom/mfp/konica/toner/tnp22c/low</uei>
  <event-label>User-defined threshold event uei.opennms.org/custom/mfp/konica/toner/tnp22c/low</event-label>
  <descr>Threshold exceeded for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</descr>
  <logmsg dest="logndisplay">Threshold exceeded for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</logmsg>
  <severity>Warning</severity>
</event>
<event>
  <uei>uei.opennms.org/custom/mfp/konica/toner/tnp22c/full</uei>
  <event-label>User-defined threshold event uei.opennms.org/custom/mfp/konica/toner/tnp22c/full</event-label>
  <descr>Threshold rearmed for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</descr>
  <logmsg dest="logndisplay">Threshold rearmed for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</logmsg>
  <severity>Warning</severity>
</event>

Database modification

We require a little auxiliary table to build the UEI strings in our automations. So we create a simple table with toner UEI strings for each model and toner color.

CREATE TABLE supplyevents (id integer, event varchar(256));
INSERT INTO supplyevents (id, event) VALUES ('1', 'mfp/konica/toner/tnp22y/'), ('2', 'mfp/konica/toner/tnp22c/'), ('3', 'mfp/konica/toner/tnp22m/'), ('4', 'mfp/konica/toner/tnp22b/'); ('5', 'mfp/kyocera/toner/tk130/');
opennms=# select * from supplyevents;
 id |           event
----+---------------------------
  1 | mfp/konica/toner/tnp22y/
  2 | mfp/konica/toner/tnp22c/
  3 | mfp/konica/toner/tnp22m/
  4 | mfp/konica/toner/tnp22b/ 
  5 | mfp/kyocera/toner/tk130/
( 5 rows)

Threshd packages

Threshd packages for the tresholding are required. Put your nodes into the appropriate the surveillance groups, eg. TH-TONER-KonicaBizhubC35 and TH-TONER-Kyocera1128.

<package name="TH-TONER-KonicaBizhubC35">
 <filter>categoryname == 'TH-TONER-KonicaBizhubC35'</filter>
 <include-range begin="1.1.1.1" end="254.254.254.254"/>
 <service name="SNMP" interval="300000" user-defined="false" status="on">
   <parameter key="thresholding-group" value="TH-TONER-KonicaBizhubC35"/>
 </service>
 </package>
<package name="TH-TONER-Kyocera1128">
 <filter>categoryname == 'TH-TONER-Kyocera1128'</filter>
 <include-range begin="1.1.1.1" end="254.254.254.254"/>
 <service name="SNMP" interval="300000" user-defined="false" status="on">
  <parameter key="thresholding-group" value="TH-TONER-Kyocera1128"/>
 </service>
</package>

Thresholds

One threshold group for each threshd package. They contain low/full thresholds for all toner models.

Note.png important

Don't use the gui to create or edit these thresholds!

<group name="TH-TONER-KonicaBizhubC35" rrdRepository="/opt/opennms/share/rrd/snmp/">
  <expression description="Toner Yellow" type="low"
	      ds-type="prtMarkerSuppliesIndex" value="30.0" rearm="80.0"
	      trigger="1" ds-label="prtMarkerSuppliesDescription"
	      triggeredUEI="uei.opennms.org/custom/mfp/konica/toner/tnp22y/low"
	      rearmedUEI="uei.opennms.org/custom/mfp/konica/toner/tnp22y/full"
	      filterOperator="or" expression="prtMSLevel / prtMSMaxCapacity * 100">
    <resource-filter field="prtMarkerSuppliesDescription">^Yellow\sToner$</resource-filter>
  </expression>
  <expression description="Toner Black" type="low"
	      ds-type="prtMarkerSuppliesIndex" value="30.0" rearm="80.0"
	      trigger="1" ds-label="prtMarkerSuppliesDescription"
	      triggeredUEI="uei.opennms.org/custom/mfp/konica/toner/tnp22k/low"
	      rearmedUEI="uei.opennms.org/custom/mfp/konica/toner/tnp22k/full"
	      filterOperator="or" expression="prtMSLevel / prtMSMaxCapacity * 100">
    <resource-filter field="prtMarkerSuppliesDescription">^Black\sToner$</resource-filter>
  </expression>
  <expression description="Toner Magenta" type="low"
	      ds-type="prtMarkerSuppliesIndex" value="30.0" rearm="80.0"
	      trigger="1" ds-label="prtMarkerSuppliesDescription"
	      triggeredUEI="uei.opennms.org/custom/mfp/konica/toner/tnp22m/low"
	      rearmedUEI="uei.opennms.org/custom/mfp/konica/toner/tnp22m/full"
	      filterOperator="or" expression="prtMSLevel / prtMSMaxCapacity * 100">
    <resource-filter field="prtMarkerSuppliesDescription">^Magenta\sToner$</resource-filter>
  </expression>
  <expression description="Toner Cyan" type="low"
	      ds-type="prtMarkerSuppliesIndex" value="30.0" rearm="80.0"
	      trigger="1" ds-label="prtMarkerSuppliesDescription"
	      triggeredUEI="uei.opennms.org/custom/mfp/konica/toner/tnp22c/low"
	      rearmedUEI="uei.opennms.org/custom/mfp/konica/toner/tnp22c/full"
	      filterOperator="or" expression="prtMSLevel / prtMSMaxCapacity * 100">
    <resource-filter field="prtMarkerSuppliesDescription">^Cyan\sToner$</resource-filter>
  </expression>
</group>
<group name="TH-TONER-Kyocera1128" rrdRepository="/opt/opennms/share/rrd/snmp/">
  <expression type="low" ds-type="prtMarkerSuppliesIndex"
	      value="30.0" rearm="80.0" trigger="1"
	      ds-label="prtMarkerSuppliesDescription"
	      triggeredUEI="uei.opennms.org/custom/mfp/kyocera/toner/tk130/low"
	      rearmedUEI="uei.opennms.org/custom/mfp/kyocera/toner/tk130/full"
	      filterOperator="or" expression="prtMSLevel / prtMSMaxCapacity * 100">
    <resource-filter field="prtMarkerSuppliesDescription">^TK\-130</resource-filter>
    <resource-filter field="prtMarkerSuppliesDescription">^TK\-130S</resource-filter>
  </expression>
</group>

Vacuumd config

And here is "the magic": Three automations are required to do the job!

Automations

  • The first automation orderResource is used to check if there is a unacknowledged new toner low event and no order event. If so, OpenNMS generates an order event and acknowledges the low event.

It's very important to check the presence of order events because every OpenNMS restart will trigger a new toner low event. So every OpenNMS restart will order new toner. Really expensive...

  • The second automation rearmResourceCheck checks if there is a associated and unacknowledged toner full event. If so, all involved events will be acknowledged. The case is finished.
  • We needed a third automation autoAckResourceNotif to acknowledge all cleared notifications to tidy up the notification menu.
<automation name="orderResource" interval="1800000" trigger-name="orderResourceTrigger"  action-name="orderResourceAction" action-event="orderResourceActionEvent" active="true"/>
<automation name="rearmResourceCheck" interval="1800000" trigger-name="rearmResourceCheckTrigger" action-name="rearmResourceCheckAction" active="true" />
<automation name="autoAckResourceNotif" interval="60000" trigger-name="autoAckResourceNotifTrigger" action-name="autoAckResourceNotifAction" active="true" />

Triggers

    <trigger name="orderResourceTrigger" operator=">=" row-count="1">
      <statement>
      select distinct
        e.nodeid as _nodeid,
        e.ipaddr as _ipaddr,
        e.eventlogmsg as _eventlogmsg,
        e.eventsource as _eventsource,
        e.serviceid as _serviceid,
        e.eventparms as _eventparms,
        e.eventseverity as _eventseverity,
        e.eventdisplay as _eventdisplay,
        e.eventlog as _eventlog,
        e.eventuei as _lowuei,
        'uei.opennms.org/custom/'||se.event||'order' as _orderuei,
        now() as _ts
      from
        events e
        join supplyevents se
          on e.eventuei = 'uei.opennms.org/custom/'||se.event||'low'
      where
        e.eventuei='uei.opennms.org/custom/'||se.event||'low' and
        e.eventackuser is null and
        not exists (
          select
            e2.eventid
          from
            events e2
          where
            e2.nodeid=e.nodeid and
            e2.eventuei='uei.opennms.org/custom/'||se.event||'order' and
            e2.eventackuser is null
        );
      </statement>
    </trigger>    <trigger name="rearmResourceCheckTrigger" operator=">=" row-count="1">
      <statement>
        select distinct
          now() as _ts,
          e.nodeid as _nodeid,
          e.eventuei as _fulluei,
          'uei.opennms.org/custom/'||se.event||'order' as _orderuei,
          'uei.opennms.org/custom/'||se.event||'low' as _lowuei
        from
          events e
          join supplyevents se
            on e.eventuei = 'uei.opennms.org/custom/'||se.event||'full'
        where
          eventuei='uei.opennms.org/custom/'||se.event||'full' and
          e.eventackuser is null and
          lower(e.eventdescr) not like '%configuration has been changed%';
      </statement>
    </trigger>
    <trigger name="autoAckResourceNotifTrigger" operator=">=" row-count="1">
      <statement>
        select
          n.notifyid as _notifyid
        from
          notifications n
          join events e on e.eventid = n.eventid
          join category_node cn on cn.nodeid=n.nodeid
          join categories c on c.categoryid=cn.categoryid
        where
          e.eventseverity=2 and
          n.pagetime < now()-interval '2 weeks' and
          ((n.answeredby is null) or n.answeredby = '') and
          lower(c.categoryname) like 'pr-%'
      </statement>
    </trigger>

Actions

  <action name="orderResourceAction">
    <statement>
      update
        events
      set
        eventackuser = 'admin',
        eventacktime = ${_ts},
        eventseverity = 3
      where
        nodeid=${_nodeid} and
        eventuei = ${_lowuei} and
        eventackuser is null
    </statement>
  </action>

  <action name="rearmResourceCheckAction">
    <statement>
      UPDATE
        events
      SET
        eventackuser = 'admin',
        eventacktime = ${_ts},
        eventseverity = 2
      WHERE
        nodeid = ${_nodeid} and
        (
          eventuei = ${_fulluei} or
          eventuei = ${_orderuei} or
          eventuei = ${_lowuei}
        ) and
        eventackuser is null
    </statement>
  </action>


  <action name="autoAckResourceNotifAction">
    <statement>
      update
        notifications
      set
        answeredby = 'TonerBitch',
        respondtime = now()
      where
        notifyid = ${_notifyid}
    </statement>
  </action>

Action events

    <action-event name="orderResourceActionEvent" for-each-result="true">
      <assignment type="field" name="uei" value="${_orderuei}"/>
      <assignment type="field" name="nodeid" value="${_nodeid}"/>
      <assignment type="field" name="interface" value="${_ipaddr}"/>
      <assignment type="field" name="eventparms" value="${_eventparms}"/>
      <assignment type="field" name="eventseverity" value="${_eventseverity}"/>
    </action-event>

Notifications

The notifications are triggered by the order events. We used the regex filter to reduce the amount of notifications. Using a surveillance group in the rule will only selected the correct nodes. The destinationPath contain the email address of the related vendor. And text-message field uses asset and threshold fields to create a readable purchase order.

<notifications>
  <notification name="Toner-Order-Kyocera" status="on" writeable="yes">
    <uei>~uei.opennms.org/custom/mfp/kyocera/toner/tk.*/order</uei>
    <rule>(catincNameOfKyoceraSupplyVendor)</rule>
    <destinationPath>Toner-Order-KyoceraSupplyVendor</destinationPath>
    <text-message>Dear Sir or Madam,<br>&#xd;
      <br>&#xd;
      the printer %nodelabel%, %asset[manufacturer]% %asset[modelnumber]%, SN: %asset[serialnumber]% reports for unit %parm[#1]% a value of %parm[value]% %. Please send a unit of %parm[1]% to the following address:<br>&#xd;
      <br>&#xd;
      %asset[department]%<br>&#xd;
      %asset[division]%, %nodelabel%<br>&#xd;
      %asset[address1]%<br>&#xd;
      %asset[zip]%, %asset[city]%<br>&#xd;
      <br>&#xd;
      Thanks you very much.<br>&#xd;
      <br>&#xd;
      Best regards<br>&#xd;
      %asset[department]%<br>&#xd;
      <br>&#xd;
      <br>&#xd;
      -This email was automaticly generated. It's not possible to answer-</text-message>
    <subject>Toner-Order #%noticeid% - %nodelabel%</subject>
    <numeric-message>111-%noticeid%</numeric-message>
  </notification>
  
  
  <notification name="Toner-Order-Konica" status="off" writeable="yes">
    <uei>~uei.opennms.org/custom/mfp/konica/toner/tn.*/order</uei>
    <rule>catincNameOfKonicaSupplyVendor/rule>
      <destinationPath>Toner-Order-KonicaSupplyVendor</destinationPath>
      <text-message>Dear Sir or Madam,<br>&#xd;
	<br>&#xd;
	the printer %nodelabel%, %asset[manufacturer]% %asset[modelnumber]%, SN: %asset[serialnumber]% reports for unit %parm[#1]% a value of %parm[value]% %. Please send a unit of %parm[1]% to the following address:<br>&#xd;
	<br>&#xd;
	%asset[department]%<br>&#xd;
	%asset[division]%, %nodelabel%<br>&#xd;
	%asset[address1]%<br>&#xd;
	%asset[zip]%, %asset[city]%<br>&#xd;
	<br>&#xd;
	Thanks you very much.<br>&#xd;
	<br>&#xd;
	Best regards<br>&#xd;
	%asset[department]%<br>&#xd;
	<br>&#xd;
	<br>&#xd;
	-This email was automaticly generated. It's not possible to answer-</text-message>
      <subject>Toner-Order #%noticeid% - %nodelabel%</subject>
      <numeric-message>111-%noticeid%</numeric-message>
    </notification>
  </notifications>
  

Configuration: Information about problems

Today printers have all-inclusive full service. Especially if you lease the devices. So it is possible to send some events like "CallService" directly to our printer merchant. Other events like "PaperEmpty" can be send to the current users who work with this devices.

Printer config

You have to configure your printers to send SNMP traps to your OpenNMS server.

Konica-trap-config.png

Event configuration

Fortunately OpenNMS already knows Konica Minolta traps (http://issues.opennms.org/browse/NMS-5699). Unfortunately we couldn't translate Kyocera Mita traps. For some reasons Kyocera printers send the same OIDs for equal traps (http://issues.opennms.org/browse/NMS-7103). So it's not possible to configure a notification for Kyocera devices.

Notifications

Konica Minolta notification templates for all existing Konica traps.

<notification name="TRAP - Konica Minolta - CallService" status="on" writeable="yes">
  <uei>uei.opennms.org/vendor/konica/minolta/traps/CallService</uei>
  <rule>IPADDR IPLIKE *.*.*.*</rule>
  <destinationPath>email-admin</destinationPath>
  <text-message>%parm[all]%<br>&#xd;
    <br>&#xd;
    Location:<br>&#xd;
    %asset[department]%<br>&#xd;
    %asset[manufacturer]% %asset[modelnumber]%<br>&#xd;
    Serialnumber: %asset[serialnumber]%<br>&#xd;
    %asset[address1]%<br>&#xd;
    %asset[zip]%, %asset[city]%<br>&#xd;
  </text-message>
  <subject>[TRAP] - %nodelabel% CallService</subject>
  <numeric-message>111-%noticeid%</numeric-message>
</notification>
<notification name="TRAP - Konica Minolta - PaperJam" status="on" writeable="yes">
  <uei>uei.opennms.org/vendor/konica/minolta/traps/PaperJam</uei>
  <rule>IPADDR IPLIKE *.*.*.*</rule>
  <destinationPath>email-admin</destinationPath>
  <text-message>%parm[all]%<br>&#xd;
    <br>&#xd;
    Location:<br>&#xd;
    %asset[department]%<br>&#xd;
    %asset[manufacturer]% %asset[modelnumber]%<br>&#xd;
    Serialnumber: %asset[serialnumber]%<br>&#xd;
    %asset[address1]%<br>&#xd;
    %asset[zip]%, %asset[city]%<br>&#xd;
  </text-message>
  <subject>[TRAP] - %nodelabel% PaperJam</subject>
  <numeric-message>111-%noticeid%</numeric-message>
</notification>
<notification name="TRAP - Konica Minolta - NoPaper" status="on" writeable="yes">
  <uei>uei.opennms.org/vendor/konica/minolta/traps/NoPaper</uei>
  <rule>IPADDR IPLIKE *.*.*.*</rule>
  <destinationPath>email-admin</destinationPath>
  <text-message>http://%parm[#1]%<br>&#xd;
    <br>&#xd;
    Location:<br>&#xd;
    %asset[department]%<br>&#xd;
    %asset[manufacturer]% %asset[modelnumber]%<br>&#xd;
    Serialnumber: %asset[serialnumber]%<br>&#xd;
    %asset[address1]%<br>&#xd;
    %asset[zip]%, %asset[city]%<br>&#xd;
  </text-message>
  <subject>[TRAP] - %nodelabel% NoPaper</subject>
  <numeric-message>111-%noticeid%</numeric-message>
</notification>
<notification name="TRAP - Konica Minolta - StableEmpty" status="on" writeable="yes">
  <uei>uei.opennms.org/vendor/konica/minolta/traps/StapleEmpty</uei>
  <rule>IPADDR IPLIKE *.*.*.*</rule>
  <destinationPath>email-admin</destinationPath>
  <text-message>%parm[all]%<br>&#xd;
    <br>&#xd;
    Location:<br>&#xd;
    %asset[department]%<br>&#xd;
    %asset[manufacturer]% %asset[modelnumber]%<br>&#xd;
    Serialnumber: %asset[serialnumber]%<br>&#xd;
    %asset[address1]%<br>&#xd;
    %asset[zip]%, %asset[city]%<br>&#xd;
  </text-message>
  <subject>[TRAP] - %nodelabel% StableEmpty</subject>
  <numeric-message>111-%noticeid%</numeric-message>
</notification>
<notification name="TRAP - Konica Minolta - PunchDustFull" status="on" writeable="yes">
  <uei>uei.opennms.org/vendor/konica/minolta/traps/PunchDustFull</uei>
  <rule>IPADDR IPLIKE *.*.*.*</rule>
  <destinationPath>email-admin</destinationPath>
  <text-message>%parm[all]%<br>&#xd;
    <br>&#xd;
    Location:<br>&#xd;
    %asset[department]%<br>&#xd;
    %asset[manufacturer]% %asset[modelnumber]%<br>&#xd;
    Serialnumber: %asset[serialnumber]%<br>&#xd;
    %asset[address1]%<br>&#xd;
    %asset[zip]%, %asset[city]%<br>&#xd;
  </text-message>
  <subject>[TRAP] - %nodelabel% PunchDustFull</subject>
  <numeric-message>111-%noticeid%</numeric-message>
</notification>
<notification name="TRAP - Konica Minolta - MaintenanceRequired" status="on" writeable="yes">
  <uei>uei.opennms.org/vendor/konica/minolta/traps/MaintenanceRequired</uei>
  <rule>IPADDR IPLIKE *.*.*.*</rule>
  <destinationPath>email-admin</destinationPath>
  <text-message>%parm[all]%<br>&#xd;
    <br>&#xd;
    Location:<br>&#xd;
    %asset[department]%<br>&#xd;
    %asset[manufacturer]% %asset[modelnumber]%<br>&#xd;
    Serialnumber: %asset[serialnumber]%<br>&#xd;
    %asset[address1]%<br>&#xd;
    %asset[zip]%, %asset[city]%<br>&#xd;
  </text-message>
  <subject>[TRAP] - %nodelabel% MaintenanceRequired</subject>
  <numeric-message>111-%noticeid%</numeric-message>
</notification>
<notification name="TRAP - Konica Minolta - WasteTonerFull" status="on" writeable="yes">
  <uei>uei.opennms.org/vendor/konica/minolta/traps/WasteTonerFull</uei>
  <rule>IPADDR IPLIKE *.*.*.*</rule>
  <destinationPath>email-admin</destinationPath>
  <text-message>%parm[all]%<br>&#xd;
    <br>&#xd;
    Location:<br>&#xd;
    %asset[department]%<br>&#xd;
    %asset[manufacturer]% %asset[modelnumber]%<br>&#xd;
    Serialnumber: %asset[serialnumber]%<br>&#xd;
    %asset[address1]%<br>&#xd;
    %asset[zip]%, %asset[city]%<br>&#xd;
  </text-message>
  <subject>[TRAP] - %nodelabel% WasteTonerFull</subject>
  <numeric-message>111-%noticeid%</numeric-message>
</notification>
<notification name="TRAP - Konica Minolta - OperatorCall" status="on" writeable="yes">
  <uei>uei.opennms.org/vendor/konica/minolta/traps/OperatorCall</uei>
  <rule>IPADDR IPLIKE *.*.*.*</rule>
  <destinationPath>email-admin</destinationPath>
  <text-message>%parm[all]%<br>&#xd;
    <br>&#xd;
    Location:<br>&#xd;
    %asset[department]%<br>&#xd;
    %asset[manufacturer]% %asset[modelnumber]%<br>&#xd;
    Serialnumber: %asset[serialnumber]%<br>&#xd;
    %asset[address1]%<br>&#xd;
    %asset[zip]%, %asset[city]%<br>&#xd;
  </text-message>
  <subject>[TRAP] - %nodelabel% OperatorCall</subject>
  <numeric-message>111-%noticeid%</numeric-message>
</notification>


Conclusion

  • In some cases Konica Minolta Bizhubs printers can cause toner peaks, so OpenNMS "thinks" the ordered toner is inserted and the automations will do their job and finish the order process. The next polling cycle will generate a new toner low event and now we have a second toner order. (http://issues.opennms.org/browse/NMS-7031)
  • On idea was to gather the amount of toner cartridges for each printer. So OpenNMS should be able to order not more than 2 cartridges (to avoid capital lockup)
  • It's also possible to monitor/order other supplies like development cartridges, ozone filters or hole-punch scrap boxes. Unfortunately Konica Minolta printers don't calculate a correct life cycle values. So this units lasts 2-3 times longer than communicated.