zabbix_export:
  version: '7.0'
  template_groups:
    - uuid: e960332b3f6c46a1956486d4f3f99fce
      name: 'Templates/Server hardware'
  templates:
    - uuid: 02f35169a5a54a5aad8b3f06e798ab1f
      template: 'Chassis by IPMI'
      name: 'Chassis by IPMI'
      description: |
        Template for monitoring servers with BMC over IPMI that work without any external scripts.
        All metrics are collected at once, thanks to Zabbix's bulk data collection. The template is available starting from Zabbix version 5.0.
        It collects metrics by polling BMC remotely using an IPMI agent.
        
        
        Known Issues:
        
          Description: If the BMC has a sensor with an empty threshold value, we get the LLD error "Cannot create trigger...".
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/398023-discussion-thread-for-official-zabbix-template-ipmi
        
        Generated by official Zabbix template tool "Templator"
      vendor:
        name: Zabbix
        version: 7.0-0
      groups:
        - name: 'Templates/Server hardware'
      items:
        - uuid: dbcf45cb09284fc19a17e7369c8fda43
          name: 'Get IPMI sensors'
          type: IPMI
          key: ipmi.get
          history: '0'
          value_type: TEXT
          description: 'The master item that receives all sensors with values for LLD and dependent elements from BMC.'
          tags:
            - tag: component
              value: raw
      discovery_rules:
        - uuid: d0a3bd3c62d7438d8acde8ff0a9bb4db
          name: 'Discrete sensors discovery'
          type: DEPENDENT
          key: ipmi.discrete.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#SENSOR_READING_TYPE}'
                value: threshold
                operator: NOT_MATCHES_REGEX
              - macro: '{#SENSOR_TYPE}'
                value: '{$IPMI.SENSOR_TYPE.MATCHES}'
              - macro: '{#SENSOR_TYPE}'
                value: '{$IPMI.SENSOR_TYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of the discrete IPMI sensors.'
          item_prototypes:
            - uuid: 6ce86fa51c614f94b2250e14af8d9385
              name: '{#SENSOR_ID}'
              type: DEPENDENT
              key: 'ipmi.state_text[{#SENSOR_ID}]'
              value_type: CHAR
              description: 'It is a state of the discrete IPMI sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.id==''{#SENSOR_ID}'')].state.text.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: ipmi.get
              tags:
                - tag: component
                  value: environment
                - tag: sensor
                  value: '{#SENSOR_TYPE}'
              trigger_prototypes:
                - uuid: efe107571d704895bbb43c95407e6689
                  expression: 'last(/Chassis by IPMI/ipmi.state_text[{#SENSOR_ID}],#1)<>last(/Chassis by IPMI/ipmi.state_text[{#SENSOR_ID}],#2)'
                  name: '{#SENSOR_ID} value has changed'
                  priority: INFO
                  description: 'The trigger is informing about changes in a state of the discrete IPMI sensor. A problem generated by this trigger can be manually closed.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: ipmi.get
          lld_macro_paths:
            - lld_macro: '{#SENSOR_ID}'
              path: $.id
            - lld_macro: '{#SENSOR_READING_TYPE}'
              path: $.reading.text
            - lld_macro: '{#SENSOR_TYPE}'
              path: $.sensor.text
            - lld_macro: '{#SENSOR_UNIT}'
              path: $.units
        - uuid: bd5ceb5412d3462d90fa857b2d214788
          name: 'Threshold sensors discovery'
          type: DEPENDENT
          key: ipmi.sensors.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#SENSOR_READING_TYPE}'
                value: threshold
              - macro: '{#SENSOR_TYPE}'
                value: '{$IPMI.SENSOR_TYPE.MATCHES}'
              - macro: '{#SENSOR_TYPE}'
                value: '{$IPMI.SENSOR_TYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of the threshold IPMI sensors.'
          item_prototypes:
            - uuid: 77e8c8c6e2444667b5da698c802dbae0
              name: '{#SENSOR_ID}, {#SENSOR_UNIT}'
              type: DEPENDENT
              key: 'ipmi.value[{#SENSOR_ID}]'
              value_type: FLOAT
              description: 'It is a state of the threshold IPMI sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.id==''{#SENSOR_ID}'')].value.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: ipmi.get
              tags:
                - tag: component
                  value: environment
                - tag: sensor
                  value: '{#SENSOR_TYPE}'
              trigger_prototypes:
                - uuid: e9c37c1847d64920b80a20cc764b6c81
                  expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)>{#SENSOR_HI_CRIT}'
                  name: '{#SENSOR_ID} value is above critical high'
                  event_name: '{#SENSOR_ID} value is above critical high (greater than {#SENSOR_HI_CRIT} for 5m)'
                  priority: HIGH
                  description: 'The trigger is informing that a value higher than the upper critical threshold has been reached.'
                  dependencies:
                    - name: '{#SENSOR_ID} value is above non-recoverable high'
                      expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)>{#SENSOR_HI_DISAST}'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 0fc9d9baa3dd4d3db841e2153b6c39b2
                  expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)>{#SENSOR_HI_WARN}'
                  name: '{#SENSOR_ID} value is above non-critical high'
                  event_name: '{#SENSOR_ID} value is above non-critical high (greater than {#SENSOR_HI_WARN} for 5m)'
                  priority: WARNING
                  description: 'The trigger is informing that a value higher than the upper non-critical threshold has been reached.'
                  dependencies:
                    - name: '{#SENSOR_ID} value is above critical high'
                      expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)>{#SENSOR_HI_CRIT}'
                    - name: '{#SENSOR_ID} value is above non-recoverable high'
                      expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)>{#SENSOR_HI_DISAST}'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 2c3dbc3f68db44f1924682a8241e0086
                  expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)>{#SENSOR_HI_DISAST}'
                  name: '{#SENSOR_ID} value is above non-recoverable high'
                  event_name: '{#SENSOR_ID} value is above non-recoverable high (greater than {#SENSOR_HI_DISAST} for 5m)'
                  priority: DISASTER
                  description: 'The trigger is informing that a value higher than the upper non-recoverable threshold has been reached.'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: adbb7e20a46d42329e4744548aa9d5f6
                  expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)<{#SENSOR_LO_CRIT}'
                  name: '{#SENSOR_ID} value is below critical low'
                  event_name: '{#SENSOR_ID} value is below critical low (less than {#SENSOR_LO_CRIT} for 5m)'
                  priority: HIGH
                  description: 'The trigger is informing that a value less than the lower critical threshold has been reached.'
                  dependencies:
                    - name: '{#SENSOR_ID} value is below non-recoverable low'
                      expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)<{#SENSOR_LO_DISAST}'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 7b712e7b11a34635948517467f77ad9d
                  expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)<{#SENSOR_LO_WARN}'
                  name: '{#SENSOR_ID} value is below non-critical low'
                  event_name: '{#SENSOR_ID} value is below non-critical low (less than {#SENSOR_LO_WARN} for 5m)'
                  priority: WARNING
                  description: 'The trigger is informing that a value less than the lower non-critical threshold has been reached.'
                  dependencies:
                    - name: '{#SENSOR_ID} value is below critical low'
                      expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)<{#SENSOR_LO_CRIT}'
                    - name: '{#SENSOR_ID} value is below non-recoverable low'
                      expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)<{#SENSOR_LO_DISAST}'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: b078ee6b820f44f2871c2e3fcd0ce4cf
                  expression: 'min(/Chassis by IPMI/ipmi.value[{#SENSOR_ID}],5m)<{#SENSOR_LO_DISAST}'
                  name: '{#SENSOR_ID} value is below non-recoverable low'
                  event_name: '{#SENSOR_ID} value is below non-recoverable low (less than {#SENSOR_LO_DISAST} for 5m)'
                  priority: DISASTER
                  description: 'The trigger is informing that a value less than the lower non-recoverable threshold has been reached.'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: 85099badf8d547d89f498cf29bcd51a8
              name: 'IPMI: {#SENSOR_ID}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Chassis by IPMI'
                    key: 'ipmi.value[{#SENSOR_ID}]'
          master_item:
            key: ipmi.get
          lld_macro_paths:
            - lld_macro: '{#SENSOR_HI_CRIT}'
              path: $.threshold.upper.crit
            - lld_macro: '{#SENSOR_HI_DISAST}'
              path: $.threshold.upper.non_recover
            - lld_macro: '{#SENSOR_HI_WARN}'
              path: $.threshold.upper.non_crit
            - lld_macro: '{#SENSOR_ID}'
              path: $.id
            - lld_macro: '{#SENSOR_LO_CRIT}'
              path: $.threshold.lower.crit
            - lld_macro: '{#SENSOR_LO_DISAST}'
              path: $.threshold.lower.non_recover
            - lld_macro: '{#SENSOR_LO_WARN}'
              path: $.threshold.lower.non_crit
            - lld_macro: '{#SENSOR_READING_TYPE}'
              path: $.reading.text
            - lld_macro: '{#SENSOR_TYPE}'
              path: $.sensor.text
            - lld_macro: '{#SENSOR_UNIT}'
              path: $.units
          overrides:
            - name: 'trigger SENSOR_LO_WARN'
              step: '1'
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: LIKE
                  value: '{#SENSOR_LO_WARN}'
                  discover: NO_DISCOVER
            - name: 'trigger SENSOR_LO_CRIT'
              step: '2'
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: LIKE
                  value: '{#SENSOR_LO_CRIT}'
                  discover: NO_DISCOVER
            - name: 'trigger SENSOR_LO_DISAST'
              step: '3'
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: LIKE
                  value: '{#SENSOR_LO_DISAST}'
                  discover: NO_DISCOVER
            - name: 'trigger SENSOR_HI_WARN'
              step: '4'
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: LIKE
                  value: '{#SENSOR_HI_WARN}'
                  discover: NO_DISCOVER
            - name: 'trigger SENSOR_HI_CRIT'
              step: '5'
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: LIKE
                  value: '{#SENSOR_HI_CRIT}'
                  discover: NO_DISCOVER
            - name: 'trigger SENSOR_HI_DISAST'
              step: '6'
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: LIKE
                  value: '{#SENSOR_HI_DISAST}'
                  discover: NO_DISCOVER
      tags:
        - tag: class
          value: hardware
        - tag: target
          value: server
      macros:
        - macro: '{$IPMI.PASSWORD}'
          description: 'This macro is used for access to BMC. It can be overridden on the host or linked template level.'
        - macro: '{$IPMI.SENSOR_TYPE.MATCHES}'
          value: '.*'
          description: 'This macro is used in sensors discovery. It can be overridden on the host or linked template level.'
        - macro: '{$IPMI.SENSOR_TYPE.NOT_MATCHES}'
          value: invalid
          description: 'This macro is used in sensors discovery. It can be overridden on the host or linked template level.'
        - macro: '{$IPMI.USER}'
          description: 'This macro is used for access to BMC. It can be overridden on the host or linked template level.'
