# Profile for Cisco ASA devices
extends:
  - _cisco-base.yaml
  - _std-entity-sensor-mib.yaml

metrics:
  - MIB: CISCO-FIREWALL-MIB
    table:
      OID: 1.3.6.1.4.1.9.9.147.1.2.2.2
      name: cfwConnectionStatTable
    symbols:
      - OID: 1.3.6.1.4.1.9.9.147.1.2.2.2.1.5
        name: cfwConnectionStatValue
        chart_meta:
          description: Current status of the resource statistic
          family: 'Network/Firewall/Connection/Count'
          unit: "{connection}"
    metric_tags:
      - tag: service_type
        index: 1
        mapping:
          1: otherFWService
          2: fileXferFtp
          3: fileXferTftp
          4: fileXferFtps
          5: loginTelnet
          6: loginRlogin
          7: loginTelnets
          8: remoteExecSunRPC
          9: remoteExecMSRPC
          10: remoteExecRsh
          11: remoteExecXserver
          12: webHttp
          13: webHttps
          14: mailSmtp
          15: multimediaStreamworks
          16: multimediaH323
          17: multimediaNetShow
          18: multimediaVDOLive
          19: multimediaRealAV
          20: multimediaRTSP
          21: dbOracle
          22: dbMSsql
          23: contInspProgLang
          24: contInspUrl
          25: directoryNis
          26: directoryDns
          27: directoryNetbiosns
          28: directoryNetbiosdgm
          29: directoryNetbiosssn
          30: directoryWins
          31: qryWhois
          32: qryFinger
          33: qryIdent
          34: fsNfsStatus
          35: fsNfs
          36: fsCifs
          37: protoIcmp
          38: protoTcp
          39: protoUdp
          40: protoIp
          41: protoSnmp
      - tag: stat_type
        index: 2
        mapping: # TODO: create a separate metric for each type via transform
          1: other
          2: totalOpen         # Total number of connections opened since system startup
          3: currentOpen       # Current number of open connections
          4: currentClosing    # Current number of connections in the process of closing
          5: currentHalfOpen   # Current number of half-open connections (e.g. TCP SYN received)
          6: currentInUse      # Current number of connections in use by the firewall
          7: high              # Highest number of connections in use since system startup

  - MIB: CISCO-REMOTE-ACCESS-MONITOR-MIB
    symbol:
      OID: 1.3.6.1.4.1.9.9.392.1.4.1.2.0
      name: crasNumDeclinedSessions
      chart_meta:
        description: Number of session setup attempts declined due to authentication or authorization failure
        family: 'Network/VPN/RemoteAccess/Session/Declined'
        unit: "{session}/s"
  - MIB: CISCO-REMOTE-ACCESS-MONITOR-MIB
    symbol:
      OID: 1.3.6.1.4.1.9.9.392.1.3.1.0
      name: crasNumSessions
      chart_meta:
        description: Number of currently active sessions
        family: 'Network/VPN/RemoteAccess/Session/Active'
        unit: "{session}"
  - MIB: CISCO-REMOTE-ACCESS-MONITOR-MIB
    symbol:
      OID: 1.3.6.1.4.1.9.9.392.1.3.3.0
      name: crasNumUsers
      chart_meta:
        description: Number of users who have active sessions
        family: 'Network/VPN/RemoteAccess/User/Active'
        unit: "{user}"
  - MIB: CISCO-REMOTE-ACCESS-MONITOR-MIB
    metric_type: monotonic_count
    symbol:
      OID: 1.3.6.1.4.1.9.9.392.1.4.1.3.0
      name: crasNumSetupFailInsufResources
      chart_meta:
        description: Number of session setup attempts failed due to insufficient resources
        family: 'Network/VPN/RemoteAccess/Session/Failed'
        unit: "{failure}/s"
  - MIB: CISCO-IPSEC-FLOW-MONITOR-MIB
    symbol:
      OID: 1.3.6.1.4.1.9.9.171.1.3.1.1.0
      name: cipSecGlobalActiveTunnels
      chart_meta:
        description: Number of currently active IPsec Phase-2 Tunnels
        family: 'Network/VPN/IPSec/Phase2/Tunnel/Active'
        unit: "{tunnel}"
  - MIB: CISCO-IPSEC-FLOW-MONITOR-MIB
    metric_type: monotonic_count
    symbol:
      OID: 1.3.6.1.4.1.9.9.171.1.3.1.4.0
      name: cipSecGlobalHcInOctets
      chart_meta:
        description: High capacity count of total octets received by all current and previous IPsec Phase-2 Tunnels
        family: 'Network/VPN/IPSec/Phase2/Tunnel/Traffic/In'
        unit: "By/s"
  - MIB: CISCO-IPSEC-FLOW-MONITOR-MIB
    metric_type: monotonic_count
    symbol:
      OID: 1.3.6.1.4.1.9.9.171.1.3.1.17.0
      name: cipSecGlobalHcOutOctets
      chart_meta:
        description: High capacity count of total octets sent by all current and previous IPsec Phase-2 Tunnels
        family: 'Network/VPN/IPSec/Phase2/Tunnel/Traffic/Out'
        unit: "By/s"
