extends:
  - chrysalis.yaml
  - _std-tcp-mib.yaml
  - _std-ucd-mib.yaml

selector:
  - sysobjectid:
      include:
        - 1.3.6.1.4.1.12383.3.1.1

metrics:
  - MIB: CHRYSALIS-UTSP-MIB
    symbol:
      OID: 1.3.6.1.4.1.12383.3.1.1.1.0
      name: hsmOperationRequests
      chart_meta:
        description: Number of operations
        family: 'Security/HSM/Operation/Request/Total'
        unit: "{operation}"
  - MIB: CHRYSALIS-UTSP-MIB
    symbol:
      OID: 1.3.6.1.4.1.12383.3.1.1.2.0
      name: hsmOperationErrors
      chart_meta:
        description: Number of operation errors
        family: 'Security/HSM/Operation/Error/Total'
        unit: "{error}"
  # - MIB: CHRYSALIS-UTSP-MIB
  #   symbol:
  #     OID: 1.3.6.1.4.1.12383.3.1.1.3.0
  #     name: hsmCriticalEvents
  #   description: Number of critical events
  #   unit: "{event}"
  # - MIB: CHRYSALIS-UTSP-MIB
  #   symbol:
  #     OID: 1.3.6.1.4.1.12383.3.1.1.4.0
  #     name: hsmNonCriticalEvents
  #   description: Number of non critical events
  #   unit: "{event}"
  # https://thalesdocs.com/gphsm/luna/7/docs/network/Content/monitoring/snmp/snmp_safenet-chrysalis-UTSP-mib.htm says these two are not implemented on the latest version
  - MIB: CHRYSALIS-UTSP-MIB
    symbol:
      OID: 1.3.6.1.4.1.12383.3.1.2.1.0
      name: ntlsOperStatus
      chart_meta:
        description: Current operational status of the NTL service
        family: 'Security/HSM/NTLS/Status/Operational'
        unit: "{status}"
      mapping:
        1: up
        2: down
        3: unknown
  - MIB: CHRYSALIS-UTSP-MIB
    symbol:
      OID: 1.3.6.1.4.1.12383.3.1.2.2.0
      name: ntlsConnectedClients
      chart_meta:
        description: The current number of connected clients using NTLS
        family: 'Security/HSM/NTLS/Client/Connected'
        unit: "{client}"
  - MIB: CHRYSALIS-UTSP-MIB
    symbol:
      OID: 1.3.6.1.4.1.12383.3.1.2.3.0
      name: ntlsLinks
      chart_meta:
        description: The current number of links in NTLS
        family: 'Security/HSM/NTLS/Link/Active'
        unit: "{link}"
  - MIB: CHRYSALIS-UTSP-MIB
    symbol:
      OID: 1.3.6.1.4.1.12383.3.1.2.4.0
      name: ntlsSuccessfulClientConnections
      chart_meta:
        description: The total number of successful client connections
        family: 'Security/HSM/NTLS/Connection/Successful/Total'
        unit: "{connection}/s"
  - MIB: CHRYSALIS-UTSP-MIB
    symbol:
      OID: 1.3.6.1.4.1.12383.3.1.2.5.0
      name: ntlsFailedClientConnections
      chart_meta:
        description: The total number of unsuccessful client connections
        family: 'Security/HSM/NTLS/Connection/Failed/Total'
        unit: "{connection}/s"

# TODO: sending tags for scalar metric is not supported yet (keep this metric and this)
# - MIB: CHRYSALIS-UTSP-MIB
#   OID: 1.3.6.1.4.1.12383.3.1.2.6.0
#   symbol: ntlsCertExpireDay
#   tag: ntls_cert_expire_day
# TODO can't find this, maybe remove
