---
display_name: Azure API Management
resource_type: Microsoft.ApiManagement/service
metrics:
  - id: capacity
    azure_name: Capacity
    time_grain: PT1M
    series:
      - aggregation: average
        kind: gauge
  - id: cpu_percent_gateway
    azure_name: CpuPercent_Gateway
    time_grain: PT1M
    series:
      - aggregation: average
        kind: gauge
  - id: memory_percent_gateway
    azure_name: MemoryPercent_Gateway
    time_grain: PT1M
    series:
      - aggregation: average
        kind: gauge
  - id: requests
    azure_name: Requests
    time_grain: PT1M
    series:
      - aggregation: total
        kind: counter
  - id: backend_duration
    azure_name: BackendDuration
    time_grain: PT1M
    series:
      - aggregation: average
        kind: gauge
  - id: duration
    azure_name: Duration
    time_grain: PT1M
    series:
      - aggregation: average
        kind: gauge
  - id: event_hub_total_events
    azure_name: EventHubTotalEvents
    time_grain: PT1M
    series:
      - aggregation: total
        kind: counter
  - id: event_hub_successful_events
    azure_name: EventHubSuccessfulEvents
    time_grain: PT1M
    series:
      - aggregation: total
        kind: counter
  - id: event_hub_total_failed_events
    azure_name: EventHubTotalFailedEvents
    time_grain: PT1M
    series:
      - aggregation: total
        kind: counter
  - id: event_hub_dropped_events
    azure_name: EventHubDroppedEvents
    time_grain: PT1M
    series:
      - aggregation: total
        kind: counter
  - id: event_hub_rejected_events
    azure_name: EventHubRejectedEvents
    time_grain: PT1M
    series:
      - aggregation: total
        kind: counter
  - id: event_hub_throttled_events
    azure_name: EventHubThrottledEvents
    time_grain: PT1M
    series:
      - aggregation: total
        kind: counter
  - id: event_hub_timedout_events
    azure_name: EventHubTimedoutEvents
    time_grain: PT1M
    series:
      - aggregation: total
        kind: counter
  - id: event_hub_total_bytes_sent
    azure_name: EventHubTotalBytesSent
    time_grain: PT1M
    series:
      - aggregation: total
        kind: counter
  - id: connection_attempts
    azure_name: ConnectionAttempts
    time_grain: PT1M
    series:
      - aggregation: total
        kind: counter
  - id: web_socket_messages
    azure_name: WebSocketMessages
    time_grain: PT1M
    series:
      - aggregation: total
        kind: counter
  - id: network_connectivity
    azure_name: NetworkConnectivity
    time_grain: PT1M
    series:
      - aggregation: average
        kind: gauge
template:
  family: Azure API Management
  context_namespace: api_management
  chart_defaults:
    label_promotion:
      - resource_name
      - resource_group
      - region
      - resource_type
      - profile
    instances:
      by_labels:
        - resource_uid
  charts:
    - id: am_azure_api_management__capacity
      title: Azure API Management Capacity Utilization
      context: capacity
      family: Capacity
      type: line
      units: percentage
      algorithm: absolute
      dimensions:
        - selector: capacity_average
          name: capacity
    - id: am_azure_api_management__gateway_cpu
      title: Azure API Management Gateway CPU
      context: gateway_cpu
      family: Capacity
      type: line
      units: percentage
      algorithm: absolute
      dimensions:
        - selector: cpu_percent_gateway_average
          name: cpu
    - id: am_azure_api_management__gateway_memory
      title: Azure API Management Gateway Memory
      context: gateway_memory
      family: Capacity
      type: line
      units: percentage
      algorithm: absolute
      dimensions:
        - selector: memory_percent_gateway_average
          name: memory
    - id: am_azure_api_management__requests
      title: Azure API Management Gateway Requests
      context: requests
      family: Requests
      type: line
      units: requests/s
      algorithm: incremental
      dimensions:
        - selector: requests_total
          name: requests
    - id: am_azure_api_management__request_duration
      title: Azure API Management Request Duration
      context: request_duration
      family: Requests
      type: line
      units: milliseconds
      algorithm: absolute
      dimensions:
        - selector: duration_average
          name: overall
        - selector: backend_duration_average
          name: backend
    - id: am_azure_api_management__eventhub_events
      title: Azure API Management EventHub Events
      context: eventhub_events
      family: EventHub
      type: line
      units: events/s
      algorithm: incremental
      dimensions:
        - selector: event_hub_total_events_total
          name: total
        - selector: event_hub_successful_events_total
          name: successful
        - selector: event_hub_total_failed_events_total
          name: failed
        - selector: event_hub_dropped_events_total
          name: dropped
        - selector: event_hub_rejected_events_total
          name: rejected
        - selector: event_hub_throttled_events_total
          name: throttled
        - selector: event_hub_timedout_events_total
          name: timed_out
    - id: am_azure_api_management__eventhub_bytes
      title: Azure API Management EventHub Bytes Sent
      context: eventhub_bytes
      family: EventHub
      type: line
      units: bytes/s
      algorithm: incremental
      dimensions:
        - selector: event_hub_total_bytes_sent_total
          name: sent
    - id: am_azure_api_management__websocket_connections
      title: Azure API Management WebSocket Connection Attempts
      context: websocket_connections
      family: WebSocket
      type: line
      units: attempts/s
      algorithm: incremental
      dimensions:
        - selector: connection_attempts_total
          name: connection_attempts
    - id: am_azure_api_management__websocket_messages
      title: Azure API Management WebSocket Messages
      context: websocket_messages
      family: WebSocket
      type: line
      units: messages/s
      algorithm: incremental
      dimensions:
        - selector: web_socket_messages_total
          name: messages
    - id: am_azure_api_management__network_connectivity
      title: Azure API Management Network Connectivity Status
      context: network_connectivity
      family: Network
      type: line
      units: status
      algorithm: absolute
      dimensions:
        - selector: network_connectivity_average
          name: connectivity
