For Grafana Installation and Prometheus Integration as a Data Source, please see our related document.

Panel 1: Total API Request Volume by Request Type

  • PromQL Queries:
    • A: sum(rate(apinizer_api_traffic_total_count_total[5m]))
    • B: sum(rate(apinizer_api_traffic_success_count_total[5m]))
    • C: sum(rate(apinizer_api_traffic_error_count_total[5m]))
  • Visualization: Timeseries

Panel 2: APIs with the Highest Traffic Volume

  • PromQL Queries:
    • A: topk(5, sum by (api_name) (increase(apinizer_api_traffic_total_count_tagged_total[100m]))) 
  • Visualization: Bar gauge or Bar chart

Panel 3: API Processing Times Detail:

  • PromQL Queries:
    • A: sum(rate(apinizer_api_traffic_request_pipeline_time_seconds_sum[5m])) / sum(rate(apinizer_api_traffic_request_pipeline_time_seconds_count[5m])) * 1000
    • B: sum(rate(apinizer_api_traffic_routing_time_seconds_sum[5m])) / sum(rate(apinizer_api_traffic_routing_time_seconds_count[5m])) * 1000
    • C: sum(rate(apinizer_api_traffic_response_pipeline_time_seconds_sum[5m])) / sum(rate(apinizer_api_traffic_response_pipeline_time_seconds_count[5m])) * 1000
  • Visualization: Timeseries

Panel 4: Average Request/Response Size:

  • PromQL Queries:
    • A: sum(rate(apinizer_api_traffic_request_size_bytes_sum[5m])) / sum(rate(apinizer_api_traffic_request_size_bytes_count[5m]))
    • B: sum(rate(apinizer_api_traffic_response_size_bytes_sum[5m])) / sum(rate(apinizer_api_traffic_response_size_bytes_count[5m]))
  • Visualization: Timeseries

Panel 5: CPU Utilization of Pods:

  • PromQL Queries:
    • A: sum(system_cpu_usage{pod=~".*"}) by (pod) * 100
  • Visualization: Gauge