# Check Point HA / ClusterXL monitoring (CHECKPOINT-MIB)
# Cluster member state, status code,
# started flag, and the HA problem diagnostic table.

metrics:
  # HA installed flag (0 = not installed, non-zero = installed)
  - MIB: CHECKPOINT-MIB
    metric_type: gauge
    symbol:
      OID: 1.3.6.1.4.1.2620.1.5.2.0
      name: haInstalled
      # TODO: use mapping with 2 dimensions (e.g. installed/absent)
      chart_meta:
        description: "Whether HA/ClusterXL is installed on this gateway"
        family: 'Security/Cluster/Installed'
        unit: "{status}"

  # HA member state (displaystring: active, standby, down, ready, init)
  - MIB: CHECKPOINT-MIB
    symbol:
      OID: 1.3.6.1.4.1.2620.1.5.6.0
      name: haState
      chart_meta:
        description: "HA/ClusterXL member state"
        family: 'Security/Cluster/State'
        unit: "{status}"
      mapping:
        active: 1
        standby: 2
        down: 3
        ready: 4
        init: 5

  # HA started (displaystring: yes, no)
  - MIB: CHECKPOINT-MIB
    symbol:
      OID: 1.3.6.1.4.1.2620.1.5.5.0
      name: haStarted
      chart_meta:
        description: "Whether HA/ClusterXL has been started"
        family: 'Security/Cluster/Started'
        unit: "{status}"
      mapping:
        "yes": 1
        "no": 2

  # HA status code (integer: 0 = OK, non-zero = problem)
  - MIB: CHECKPOINT-MIB
    metric_type: gauge
    symbol:
      OID: 1.3.6.1.4.1.2620.1.5.101.0
      name: haStatCode
      chart_meta:
        description: "HA/ClusterXL numeric status code (0 = healthy)"
        family: 'Security/Cluster/Status/Code'
        unit: "{code}"

  # HA problem table — one row per cluster diagnostic finding
  - MIB: CHECKPOINT-MIB
    table:
      OID: 1.3.6.1.4.1.2620.1.5.13
      name: haProblemTable
    symbols:
      - OID: 1.3.6.1.4.1.2620.1.5.13.1.4
        name: haProblemPriority
        metric_type: gauge
        chart_meta:
          description: "HA problem priority level"
          family: 'Security/Cluster/Problem/Priority'
          unit: "{priority}"
      - OID: 1.3.6.1.4.1.2620.1.5.13.1.5
        name: haProblemVerified
        metric_type: gauge
        chart_meta:
          description: "Whether the HA problem has been verified"
          family: 'Security/Cluster/Problem/Verified'
          unit: "{status}"
    metric_tags:
      - index: 1
        tag: problem_index
      - symbol:
          OID: 1.3.6.1.4.1.2620.1.5.13.1.2
          name: haProblemName
        tag: _problem_name
      - symbol:
          OID: 1.3.6.1.4.1.2620.1.5.13.1.3
          name: haProblemStatus
        tag: _problem_status
      - symbol:
          OID: 1.3.6.1.4.1.2620.1.5.13.1.6
          name: haProblemDescr
        tag: _problem_description
