zabbix_export:
  version: '5.4'
  date: '2021-11-21T21:46:25Z'
  groups:
    -
      uuid: 58afa722676b4fba86702054223316d9
      name: Templates/Printers
  templates:
    -
      uuid: a945c91b1b74482d907485c6c2674729
      template: 'Brother Printers'
      name: 'Brother Printers'
      description: |
        ## Overview
        
        На базе шаблона на испанском сделал этот шаблон.
        
        
        Под указанный принтер - работает. Уровни тонера и Кита. Графики.
        
        
        Вопросы на 2135850@211.ru
        
        
        
        ## Author
        
        Sergey Sidenko
        
        
      groups:
        -
          name: Templates/Printers
      items:
        -
          uuid: 0ae90887cdc54fceaad19048667348e5
          name: 'Распечатано страниц'
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.2.1.43.10.2.1.4.1.1
          key: .1.3.6.1.2.1.43.10.2.1.4.1.1
          delay: 1h
          value_type: FLOAT
          tags:
            -
              tag: Application
              value: Printer
        -
          uuid: 734aa60ced6f49e6b26d0ccdf338ff42
          name: 'Остаток ресурса DRUM UNIT (страниц)'
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.2.1.43.11.1.1.9.1.2
          key: .1.3.6.1.2.1.43.11.1.1.9.1.2
          delay: 3h
          tags:
            -
              tag: Application
              value: Printer
        -
          uuid: cb0be1eca9aa4b54af184b42e8b709e6
          name: 'HTTP Check'
          type: SIMPLE
          key: 'net.tcp.service[http]'
          delay: '30'
          tags:
            -
              tag: Application
              value: Services
          triggers:
            -
              uuid: d9ae19bdfe744607a0ca939323a8c8ba
              expression: 'last(/Brother Printers/net.tcp.service[http])<>1'
              name: 'HTTP Service is Unreachable at {HOST.NAME}'
              priority: HIGH
        -
          uuid: 33881c66ad414681ac0888ad20fe043b
          name: 'Print Spooler Check'
          type: SIMPLE
          key: 'net.tcp.service[tcp,,515]'
          delay: '30'
          tags:
            -
              tag: Application
              value: Services
          triggers:
            -
              uuid: ea796c5491354360bea8a86db6183413
              expression: 'last(/Brother Printers/net.tcp.service[tcp,,515])=0'
              name: 'Printer Spooler Service is Unreachable at {HOST.NAME}'
              priority: HIGH
        -
          uuid: 0bdb2433d3804a3d8df1c1f6e57cb082
          name: 'JetDirect Check'
          type: SIMPLE
          key: 'net.tcp.service[tcp,,9100]'
          delay: '30'
          tags:
            -
              tag: Application
              value: Services
          triggers:
            -
              uuid: b92470a029f4422ba765dd0e6bdcad86
              expression: 'last(/Brother Printers/net.tcp.service[tcp,,9100])=0'
              name: 'JetDirect Service is Unreachable at {HOST.NAME}'
              priority: HIGH
        -
          uuid: 5bd34959175c4ff9855ab6830a6f421c
          name: prtMarkerSuppliesLevel
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.2.1.43.11.1.1.9.1.2
          key: prtMarkerSuppliesLevel
          delay: 1h
          tags:
            -
              tag: Application
              value: Printer
        -
          uuid: 15ec79f874524434b29ce1ab4c1200ed
          name: 'prtMarkerSuppliesLevel %'
          type: CALCULATED
          key: prtMarkerSuppliesLevel-percent
          delay: 1h
          trends: 180d
          units: '%'
          params: '100*last(//prtMarkerSuppliesLevel)/last(//prtMarkerSuppliesLevelMax)'
          tags:
            -
              tag: Application
              value: Printer
          triggers:
            -
              uuid: 1553a1f9155e458da3b5a18325a7b5f0
              expression: 'last(/Brother Printers/prtMarkerSuppliesLevel-percent)<10'
              name: 'Уровень тонера  {HOSTNAME} < 10 %'
              priority: WARNING
            -
              uuid: 6a40547fdf024b1aa5dcebed2b69e8d4
              expression: 'last(/Brother Printers/prtMarkerSuppliesLevel-percent)<20'
              name: 'Уровень тонера  {HOSTNAME} < 20 %'
              priority: INFO
        -
          uuid: 644fba4532aa4e6dbc9280cd802e23ac
          name: prtMarkerSuppliesLevelMax
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.2.1.43.11.1.1.8.1.2
          key: prtMarkerSuppliesLevelMax
          delay: 3h
          tags:
            -
              tag: Application
              value: Printer
        -
          uuid: 0e692c74d5ab4d47a00578c7798792ec
          name: 'Device contact details'
          type: SNMP_AGENT
          snmp_oid: 1.3.6.1.2.1.1.4.0
          key: system.contact
          delay: 3h
          history: 2w
          trends: '0'
          value_type: CHAR
          description: |
            MIB: SNMPv2-MIB
            The textual identification of the contact person for this managed node, together with information on how to contact this person.  If no contact information is known, the value is the zero-length string.
          inventory_link: CONTACT
          tags:
            -
              tag: Application
              value: System
        -
          uuid: c8700f37812d41adb90a8c5db3715302
          name: 'Device description'
          type: SNMP_AGENT
          snmp_oid: 1.3.6.1.2.1.1.1.0
          key: system.descr
          delay: 3h
          history: 2w
          trends: '0'
          value_type: CHAR
          description: |
            MIB: SNMPv2-MIB
            A textual description of the entity.  This value should
            include the full name and version identification of the system's hardware type, software operating-system, and
            networking software.
          inventory_link: HARDWARE
          tags:
            -
              tag: Application
              value: System
        -
          uuid: 5bcd8164518948529cdad352908a90be
          name: 'Device IP adress'
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.4.1.11.2.4.3.5.2.0
          key: system.ip
          delay: 3h
          history: 7d
          trends: '0'
          value_type: TEXT
          tags:
            -
              tag: Application
              value: System
        -
          uuid: 2031137136c34aedae8511c60eb915ca
          name: 'Device location'
          type: SNMP_AGENT
          snmp_oid: 1.3.6.1.2.1.1.6.0
          key: system.location
          delay: 3h
          history: 2w
          trends: '0'
          value_type: TEXT
          description: |
            MIB: SNMPv2-MIB
            The physical location of this node (e.g., `telephone closet, 3rd floor').  If the location is unknown, the value is the zero-length string.
          inventory_link: LOCATION
          tags:
            -
              tag: Application
              value: System
        -
          uuid: 41fb78d0d42f4997970f1b45a4f2d94d
          name: 'Device model'
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.2.1.25.3.2.1.3.1
          key: system.model
          delay: 3h
          trends: '0'
          value_type: TEXT
          tags:
            -
              tag: Application
              value: System
        -
          uuid: f7d4332e1acd4f23b8b032931809827a
          name: 'Device name'
          type: SNMP_AGENT
          snmp_oid: 1.3.6.1.2.1.1.5.0
          key: system.name
          delay: 3h
          history: 2w
          trends: '0'
          value_type: CHAR
          description: |
            MIB: SNMPv2-MIB
            An administratively-assigned name for this managed node.By convention, this is the node's fully-qualified domain name.  If the name is unknown, the value is the zero-length string.
          inventory_link: NAME
          tags:
            -
              tag: Application
              value: System
        -
          uuid: 752d734d27584cda90c796d833838694
          name: 'System object ID'
          type: SNMP_AGENT
          snmp_oid: 1.3.6.1.2.1.1.2.0
          key: system.objectid
          delay: 3h
          history: 2w
          trends: '0'
          value_type: CHAR
          description: |
            MIB: SNMPv2-MIB
            The vendor's authoritative identification of the network management subsystem contained in the entity.  This value is allocated within the SMI enterprises subtree (1.3.6.1.4.1) and provides an easy and unambiguous means for determining`what kind of box' is being managed.  For example, if vendor`Flintstones, Inc.' was assigned the subtree1.3.6.1.4.1.4242, it could assign the identifier 1.3.6.1.4.1.4242.1.1 to its `Fred Router'.
          tags:
            -
              tag: Application
              value: System
        -
          uuid: 3227137d08e44edf8683050519adaf6b
          name: 'Device SN'
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.2.1.43.5.1.1.17.1
          key: system.sn
          delay: 3h
          trends: '0'
          value_type: TEXT
          tags:
            -
              tag: Application
              value: System
        -
          uuid: ad632bd752ce4803a2939401b85e0fef
          name: 'Device uptime'
          type: SNMP_AGENT
          snmp_oid: 1.3.6.1.2.1.1.3.0
          key: 'system.uptime[sysUpTime]'
          history: 2w
          trends: 0d
          units: uptime
          description: |
            MIB: SNMPv2-MIB
            The time (in hundredths of a second) since the network management portion of the system was last re-initialized.
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            -
              tag: Application
              value: System
        -
          uuid: f4844965797a4c85951b5ca72a2b27ce
          name: 'SNMP availability'
          type: INTERNAL
          key: 'zabbix[host,snmp,available]'
          history: 2w
          trends: 0d
          valuemap:
            name: zabbix.host.available
          tags:
            -
              tag: Application
              value: System
      discovery_rules:
        -
          uuid: 8ef75fe1dd7f4599a72b7279fa12fe9c
          name: Consumables
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.2.1.43.11.1.1.6.1
          key: consumablesID
          delay: '60'
          item_prototypes:
            -
              uuid: 52ecdc2672994419924ce8f950f203c9
              name: '$1 Current Capacity'
              type: SNMP_AGENT
              snmp_oid: '.1.3.6.1.2.1.43.11.1.1.9.1.{#SNMPINDEX}'
              key: 'ConsumableCurrentCapacity[{#SNMPVALUE}]'
              delay: '30'
              value_type: FLOAT
            -
              uuid: d92eba62b3fe4ce4835a03971d6305a4
              name: '$1 Max Capacity'
              type: SNMP_AGENT
              snmp_oid: '.1.3.6.1.2.1.43.11.1.1.8.1.{#SNMPINDEX}'
              key: 'ConsumableMaxCapacity[{#SNMPVALUE}]'
              delay: '30'
              value_type: FLOAT
            -
              uuid: 1fa183c609c745c7adefe809da2d0e12
              name: '$1 Calculated Capacity (current/max)'
              type: CALCULATED
              key: 'CosumableCalculated[{#SNMPVALUE}]'
              delay: '30'
              value_type: FLOAT
              units: '%'
              params: 'last(//ConsumableCurrentCapacity[{#SNMPVALUE}])/last(//ConsumableMaxCapacity[{#SNMPVALUE}])'
              description: |
                Depending on the consumable (toner vs drum/belt) this calculation will return a particular percentage.
                
                Drum Units & Belt Units return integer values that can be used in calculations to determine a percentage of how much of the unit is remaining. Max "status" is stored in the MIB and is used in the calculation.
                
                Toner consumables return the follow codes:
                -3 = Level Okay
                -2 = Low Warning (equivalent to “max status”)
                0 = Critical/empty
                
                Toner possibilities for calculations of current / max * 100
                
                -3 / -2 * 100 = 150%
                -2 / -2 * 100 = 100%
                0 / -2 * 100 = 0%
                
                The calculations above are used in the triggers to make it very straight forward on determining if a toner is low or not.
              preprocessing:
                -
                  type: MULTIPLIER
                  parameters:
                    - '100'
          trigger_prototypes:
            -
              uuid: 3b985f71f6e544639a40cb80c82c205b
              expression: 'last(/Brother Printers/CosumableCalculated[{#SNMPVALUE}])<10 or last(/Brother Printers/ConsumableCurrentCapacity[{#SNMPVALUE}])=0'
              name: '{HOSTNAME} {#SNMPVALUE} - Critical: {ITEM.LASTVALUE}'
              priority: HIGH
              description: 'Checks if at "critical" level for Toners (code = 0) or drum/belt (<10%)'
            -
              uuid: ff438a9183844498bb20d80c526e483c
              expression: 'last(/Brother Printers/CosumableCalculated[{#SNMPVALUE}])>10 and last(/Brother Printers/CosumableCalculated[{#SNMPVALUE}])<30 or last(/Brother Printers/ConsumableCurrentCapacity[{#SNMPVALUE}]) = -2'
              name: '{HOSTNAME} {#SNMPVALUE} - Low Warning: {ITEM.LASTVALUE}'
              priority: WARNING
              description: 'Checks if at "warning" level for Toners (code = -2) or drum/belt (>10% & <30%)'
          graph_prototypes:
            -
              uuid: 7beac77367e7410a9063b573b6bef961
              name: '{#SNMPVALUE}'
              show_work_period: 'NO'
              show_triggers: 'NO'
              type: STACKED
              graph_items:
                -
                  color: 0000C8
                  item:
                    host: 'Brother Printers'
                    key: 'ConsumableCurrentCapacity[{#SNMPVALUE}]'
      valuemaps:
        -
          uuid: cabc7053cc7e4178bd2c839e81e5ed49
          name: zabbix.host.available
          mappings:
            -
              value: '0'
              newvalue: 'not available'
            -
              value: '1'
              newvalue: available
            -
              value: '2'
              newvalue: unknown
  graphs:
    -
      uuid: 4db2645e4e334914829809e08123ebec
      name: 'Всего распечатано страниц'
      graph_items:
        -
          color: 1A7C11
          item:
            host: 'Brother Printers'
            key: .1.3.6.1.2.1.43.10.2.1.4.1.1
    -
      uuid: 250e0dc149554abdb752eb66662f12fa
      name: 'Ресурс DRUM UNIT, страниц'
      graph_items:
        -
          color: 1A7C11
          item:
            host: 'Brother Printers'
            key: .1.3.6.1.2.1.43.11.1.1.9.1.2
    -
      uuid: b41411270ee54290ad687d808f94a0a3
      name: 'Уровень черного тонера в картридже, %'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        -
          drawtype: FILLED_REGION
          color: 3C3C3C
          item:
            host: 'Brother Printers'
            key: prtMarkerSuppliesLevel-percent
