zabbix_export:
  version: '6.2'
  date: '2023-01-05T11:55:10Z'
  template_groups:
    -
      uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
      name: Templates/Applications
  templates:
    -
      uuid: f0fb860658094c05b127d07c0d8a07f0
      template: 'PaperCut by HTTP'
      name: 'PaperCut by HTTP'
      description: 'Zabbix monitoring template to monitor PaperCut MF/NG without agent config customizations.'
      groups:
        -
          name: Templates/Applications
      items:
        -
          uuid: f84c0c636a1a414e9f5b2bfaa3b198da
          name: 'PaperCut API: Monitoring'
          type: HTTP_AGENT
          key: papercut.api
          history: '0'
          trends: '0'
          value_type: TEXT
          description: 'Master Item'
          url: 'http://{HOST.CONN}:{$PAPERCUT_PORT}/api/health'
          headers:
            -
              name: Authorization
              value: '{$PAPERCUT_AUTH_KEY}'
          tags:
            -
              tag: component
              value: raw
        -
          uuid: d730a9a8109048f6a8c6a0671a29e50e
          name: 'PaperCut API: Devices'
          type: HTTP_AGENT
          key: papercut.api.devices
          history: '0'
          trends: '0'
          value_type: TEXT
          description: 'Master Item'
          url: 'http://{HOST.CONN}:{$PAPERCUT_PORT}/api/health/devices'
          headers:
            -
              name: Authorization
              value: '{$PAPERCUT_AUTH_KEY}'
          tags:
            -
              tag: component
              value: raw
        -
          uuid: 24fb872d30004e5e9241df38f7bcd335
          name: 'PaperCut API: Printers'
          type: HTTP_AGENT
          key: papercut.api.printers
          history: '0'
          trends: '0'
          value_type: TEXT
          description: 'Master Item'
          url: 'http://{HOST.CONN}:{$PAPERCUT_PORT}/api/health/printers'
          headers:
            -
              name: Authorization
              value: '{$PAPERCUT_AUTH_KEY}'
          tags:
            -
              tag: component
              value: raw
        -
          uuid: 2e8aee818bc541049280b73568d902e6
          name: 'PaperCut printed pages in the last 60 minutes'
          type: HTTP_AGENT
          key: papercut.api.stats.recentPagesCount
          delay: 10m
          description: 'The number of pages printed by Papercut in the last 60 minutes. This number will be checked every 10 minutes'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.recentPagesCount
          url: 'http://{HOST.CONN}:{$PAPERCUT_PORT}/api/stats/recent-pages-count'
          query_fields:
            -
              name: minutes
              value: '60'
          headers:
            -
              name: Authorization
              value: '{$PAPERCUT_AUTH_KEY}'
          tags:
            -
              tag: component
              value: application
          triggers:
            -
              uuid: 93a95af91a9f4d0398b6b46aea35761e
              expression: 'nodata(/PaperCut by HTTP/papercut.api.stats.recentPagesCount,{$PAPERCUT.NODATA_TIMEOUT})=1'
              name: 'PaperCut is not available'
              event_name: 'PaperCut is not available (or nodata for {$PAPERCUT.NODATA_TIMEOUT})'
              priority: AVERAGE
              manual_close: 'YES'
              tags:
                -
                  tag: scope
                  value: availability
                -
                  tag: scope
                  value: health
        -
          uuid: f9abf6737fbb4199ba66317b0ed667ee
          name: 'PaperCut Database Active Connections'
          type: DEPENDENT
          key: papercut.database.activeConnections
          delay: '0'
          description: 'Active number of Database Connections'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.database.activeConnections
          master_item:
            key: papercut.api
          tags:
            -
              tag: application
              value: database
        -
          uuid: 5ddda1781ca84d2da733a1bdc40aa3c2
          name: 'Percentage Active Connections'
          type: CALCULATED
          key: papercut.database.activeConnections.percentage
          delay: '60'
          value_type: FLOAT
          units: '%'
          params: '(last(//papercut.database.activeConnections) / last(//papercut.database.maxConnections)) * 100'
          tags:
            -
              tag: application
              value: database
          triggers:
            -
              uuid: 705047d698bf4c018127b7d5dcafe64a
              expression: 'max(/PaperCut by HTTP/papercut.database.activeConnections.percentage,300s)>90'
              name: 'PaperCut Active database Connections > 90%'
              priority: WARNING
              description: 'Max Number of Active DB Connections is Higher then 90%'
        -
          uuid: fa8f4c08b88f4e9d951902f85b5a46a5
          name: 'PaperCut Database Max Connections'
          type: DEPENDENT
          key: papercut.database.maxConnections
          delay: '0'
          description: 'Maximum number of Database Connections'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.database.maxConnections
          master_item:
            key: papercut.api
          tags:
            -
              tag: application
              value: database
        -
          uuid: b37f86bbec944c9895b9da96958532a8
          name: 'PaperCut Database Status'
          type: DEPENDENT
          key: papercut.database.status
          delay: '0'
          trends: '0'
          value_type: TEXT
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.database.status
          master_item:
            key: papercut.api
          tags:
            -
              tag: application
              value: database
            -
              tag: component
              value: health
          triggers:
            -
              uuid: 5c4babb7352f4048bddb3ccd70b586e5
              expression: 'find(/PaperCut by HTTP/papercut.database.status,,"like","OK")=0'
              name: 'PaperCut Database Status not OK'
              priority: DISASTER
              description: |
                Database status is not OK! 
                Check Database!
              tags:
                -
                  tag: scope
                  value: health
        -
          uuid: 21e07e0f79ae480385530d429caad274
          name: 'PaperCut Devices in Error'
          type: DEPENDENT
          key: papercut.devices.inErrorCount
          delay: '0'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.devices.inErrorCount
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: application
            -
              tag: component
              value: health
        -
          uuid: 50d7936305aa47c6898b5e583c3fe509
          name: 'PaperCut Devices in Error Percentage'
          type: DEPENDENT
          key: papercut.devices.inErrorPercentage
          delay: '0'
          units: '%'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.devices.inErrorPercentage
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: application
            -
              tag: component
              value: health
        -
          uuid: 58f7fa0aa40e40e2806b767784b65f02
          name: 'PaperCut Devices Count'
          type: DEPENDENT
          key: papercut.devices.total
          delay: '0'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.devices.count
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: application
        -
          uuid: 5aab2fcbbbb84ef6b2ce86f98df8227d
          name: 'PaperCut Valid License Remaining Days'
          type: DEPENDENT
          key: papercut.license.upgradeAssuranceRemainingDays
          delay: '0'
          units: s
          description: 'This item will Check how many days there are still Left before the Papercut license will stop working. This is updated once every Hour'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.license.upgradeAssuranceRemainingDays
            -
              type: MULTIPLIER
              parameters:
                - '86400'
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: application
            -
              tag: component
              value: health
          triggers:
            -
              uuid: 69f818aebc3f49a5b387cbdb60cda61a
              expression: 'last(/PaperCut by HTTP/papercut.license.upgradeAssuranceRemainingDays)<30d'
              name: 'PaperCut Maintenance due to expire in 30d'
              priority: AVERAGE
              tags:
                -
                  tag: scope
                  value: health
            -
              uuid: b5c7e131348f4985b6af56cb173d0a0c
              expression: 'last(/PaperCut by HTTP/papercut.license.upgradeAssuranceRemainingDays)<60d'
              name: 'PaperCut Maintenance due to expire in 60d'
              priority: WARNING
              dependencies:
                -
                  name: 'PaperCut Maintenance due to expire in 30d'
                  expression: 'last(/PaperCut by HTTP/papercut.license.upgradeAssuranceRemainingDays)<30d'
              tags:
                -
                  tag: scope
                  value: health
        -
          uuid: f94c9c746a0f4b13a6f4559912dbb9e7
          name: 'PaperCut Valid License'
          type: DEPENDENT
          key: papercut.license.valid
          delay: '0'
          trends: '0'
          value_type: TEXT
          description: |
            This Item checks the License on the Papercut Server
            it will verify once every Hour if the License is still Valid.
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.license.valid
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: application
            -
              tag: component
              value: health
          triggers:
            -
              uuid: 3d9e0b0fd58f4029850666532a2b15f1
              expression: 'find(/PaperCut by HTTP/papercut.license.valid,,"like","true")=0'
              name: 'PaperCut License not valid'
              priority: AVERAGE
              description: 'Trigger will recover once the license is Valid'
              tags:
                -
                  tag: scope
                  value: availability
                -
                  tag: scope
                  value: health
        -
          uuid: d606f86d6d344c619bccefc96645930b
          name: 'PaperCut Held Jobs Count'
          type: DEPENDENT
          key: papercut.printers.heldJobCountTotal
          delay: '0'
          description: 'The number Jobs in the Queue that Papercut reported in the last 10 minutes. This number will be updated every 5 minutes'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.printers.heldJobCountTotal
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: application
        -
          uuid: 45a0241671db4312996a72098b06db55
          name: 'PaperCut Held Jobs Count Max'
          type: DEPENDENT
          key: papercut.printers.heldJobsCountMax
          delay: '0'
          description: 'The number Jobs in the Queue that Papercut reported in the last 10 minutes. This number will be updated every 5 minutes'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.printers.heldJobsCountMax
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: application
        -
          uuid: cac3a0dbd2c0406481f16267ab39beea
          name: 'PaperCut Printers in Error'
          type: DEPENDENT
          key: papercut.printers.inErrorCount
          delay: '0'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.printers.inErrorCount
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: application
            -
              tag: component
              value: health
        -
          uuid: f34be7fb9c744c89acbfbf8eb2460835
          name: 'PaperCut Printers in Error Percentage'
          type: DEPENDENT
          key: papercut.printers.inErrorPercentage
          delay: '0'
          units: '%'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.printers.inErrorPercentage
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: application
            -
              tag: component
              value: health
        -
          uuid: 7152c92314774088bad971863d5d2b21
          name: 'PaperCut Printers Count'
          type: DEPENDENT
          key: papercut.printers.total
          delay: '0'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.printers.count
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: application
        -
          uuid: ff4f4a010533472bba1ae842795bc6fb
          name: 'PaperCut Disk Space Free'
          type: DEPENDENT
          key: papercut.system.diskspace.free
          delay: '0'
          value_type: FLOAT
          units: B
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.applicationServer.systemMetrics.diskSpaceFreeMB
            -
              type: MULTIPLIER
              parameters:
                - '1024000'
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: storage
          triggers:
            -
              uuid: 86df5b0fcd114b93bd3de9d7f971e005
              expression: 'min(/PaperCut by HTTP/papercut.system.diskspace.free,600s)<1000'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'max(/PaperCut by HTTP/papercut.system.diskspace.free,600s)>1000'
              name: 'Free Space on {HOST.HOST} <1GB'
              priority: HIGH
              description: |
                During 10Min the lowest free space on the system was less then 1GB.
                
                Trigger will recover if during 10min the highest value is more then 1GB
        -
          uuid: 7e4874d6532e4469b1b0dc895e912ed2
          name: 'PaperCut DiskSpace Used'
          type: DEPENDENT
          key: papercut.system.diskspace.used
          delay: '0'
          value_type: FLOAT
          units: '%'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.applicationServer.systemMetrics.diskSpaceUsedPercentage
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: storage
        -
          uuid: 8595cb653bb9405aad0aa483193d13e4
          name: 'PaperCut JVM Memory Used Percentage'
          type: DEPENDENT
          key: papercut.system.jvmMemoryUsed
          delay: '0'
          value_type: FLOAT
          units: '%'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.applicationServer.systemMetrics.jvmMemoryUsedPercentage
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: memory
        -
          uuid: 89e82fa318d64387b6a379dc81170961
          name: 'PaperCut Uptime'
          type: DEPENDENT
          key: papercut.system.uptimeHours
          delay: '0'
          value_type: FLOAT
          units: h
          description: 'Uptime of the Papercut server. This value will be update once every hour'
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.applicationServer.systemMetrics.uptimeHours
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: application
        -
          uuid: 6fbee412c2a3486b85dd75ea208e0f19
          name: 'PaperCut Version'
          type: DEPENDENT
          key: papercut.system.version
          delay: '0'
          trends: '0'
          value_type: TEXT
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.applicationServer.systemInfo.version
          master_item:
            key: papercut.api
          tags:
            -
              tag: component
              value: application
          triggers:
            -
              uuid: 3557bbab061748998f92a51f54c954cb
              expression: |
                last(/PaperCut by HTTP/papercut.system.version,#1)<>last(/PaperCut by HTTP/papercut.system.version,#2) and 
                length(last(/PaperCut by HTTP/papercut.system.version)) > 0
              name: 'PaperCut Version has changed'
              event_name: 'PaperCut Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'PaperCut version has changed. Ack to close.'
              manual_close: 'YES'
              tags:
                -
                  tag: scope
                  value: notice
      discovery_rules:
        -
          uuid: 30a0283d2d964388ac0b70b82256fbe1
          name: 'PaperCut device discovery'
          type: DEPENDENT
          key: papercut.device.discovery
          delay: '0'
          item_prototypes:
            -
              uuid: 6ed9f65e98ab4705b5a5b7a9e7add305
              name: 'Device {#DEVICE_NAME}: Status Description'
              type: DEPENDENT
              key: 'papercut.device.status.description["{#DEVICE_NAME}"]'
              delay: '0'
              trends: '0'
              value_type: TEXT
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$.devices[?(@.name == "{#DEVICE_NAME}")].state.statusDescription.first()'
              master_item:
                key: papercut.api.devices
              tags:
                -
                  tag: component
                  value: health
            -
              uuid: 1b1be7af45a846179b33c2324db68612
              name: 'Device {#DEVICE_NAME}: Status'
              type: DEPENDENT
              key: 'papercut.device.status["{#DEVICE_NAME}"]'
              delay: '0'
              trends: '0'
              value_type: TEXT
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$.devices[?(@.name == "{#DEVICE_NAME}")].state.status.first()'
              master_item:
                key: papercut.api.devices
              tags:
                -
                  tag: component
                  value: health
              trigger_prototypes:
                -
                  uuid: a535af867d3b445fbab35df9ae2f2eba
                  expression: 'last(/PaperCut by HTTP/papercut.device.status["{#DEVICE_NAME}"],#5)<>"OK"'
                  name: 'PaperCut: Device {#DEVICE_NAME} not OK!'
                  priority: WARNING
                  tags:
                    -
                      tag: scope
                      value: availability
                    -
                      tag: scope
                      value: health
          master_item:
            key: papercut.api.devices
          lld_macro_paths:
            -
              lld_macro: '{#DEVICE_NAME}'
              path: $.name
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.devices
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        -
          uuid: 40f4a8ed0c9940a1ab25680fc2c400a8
          name: 'PaperCut printer discovery'
          type: DEPENDENT
          key: papercut.printer.discovery
          delay: '0'
          item_prototypes:
            -
              uuid: 030287d84b82442e8c1dd605c4cfb179
              name: 'Printer {#PRINTER_NAME}: Held Jobs'
              type: DEPENDENT
              key: 'papercut.printer.heldjobs["{#PRINTER_NAME}"]'
              delay: '0'
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$.printers[?(@.name == "{#PRINTER_NAME}")].heldJobsCount.first()'
              master_item:
                key: papercut.api.printers
            -
              uuid: b26e2c55236d42e5a7ceee3b4d9b304d
              name: 'Printer {#PRINTER_NAME}: Status'
              type: DEPENDENT
              key: 'papercut.printer.status["{#PRINTER_NAME}"]'
              delay: '0'
              trends: '0'
              value_type: TEXT
              preprocessing:
                -
                  type: JSONPATH
                  parameters:
                    - '$.printers[?(@.name == "{#PRINTER_NAME}")].status.first()'
              master_item:
                key: papercut.api.printers
              tags:
                -
                  tag: component
                  value: health
              trigger_prototypes:
                -
                  uuid: 2fe1c1ea8aa44a7ba738c4d82e265653
                  expression: 'last(/PaperCut by HTTP/papercut.printer.status["{#PRINTER_NAME}"],#5)<>"OK"'
                  name: 'PaperCut: Printer {#PRINTER_NAME} not OK!'
                  priority: WARNING
                  tags:
                    -
                      tag: scope
                      value: availability
                    -
                      tag: scope
                      value: health
          master_item:
            key: papercut.api.printers
          lld_macro_paths:
            -
              lld_macro: '{#PRINTER_NAME}'
              path: $.name
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - $.printers
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
      httptests:
        -
          uuid: 58feeae1830d473c81db8eabbcdc2acd
          name: 'PaperCut Status'
          steps:
            -
              name: 'Papercut Status'
              url: 'http://{HOST.CONN}:{$PAPERCUT_PORT}/api/health/status'
              headers:
                -
                  name: Authorization
                  value: '{$PAPERCUT_AUTH_KEY}'
              timeout: '15'
              status_codes: '200'
          tags:
            -
              tag: component
              value: health
      tags:
        -
          tag: class
          value: software
        -
          tag: target
          value: papercut
      macros:
        -
          macro: '{$PAPERCUT.NODATA_TIMEOUT}'
          value: 30m
        -
          macro: '{$PAPERCUT_AUTH_KEY}'
          type: SECRET_TEXT
          description: 'Authorization key for PaperCut instance. See http://localhost:9191/app?service=page/OptionsAdvanced on PaperCut server'
        -
          macro: '{$PAPERCUT_PORT}'
          value: '9191'
      valuemaps:
        -
          uuid: 01408e050c5e4fa4a3708e55d28a77dd
          name: 'Service state'
          mappings:
            -
              value: '0'
              newvalue: Down
            -
              value: '1'
              newvalue: Up
  graphs:
    -
      uuid: c024408deadf4abdb63c87abd2b926ed
      name: 'PaperCut Held Jobs'
      graph_items:
        -
          sortorder: '1'
          color: 1A7C11
          item:
            host: 'PaperCut by HTTP'
            key: papercut.printers.heldJobCountTotal
        -
          sortorder: '2'
          color: F63100
          item:
            host: 'PaperCut by HTTP'
            key: papercut.printers.heldJobsCountMax
