Prometheus

Easegress has a builtin Prometheus exporter.

Exporter URI

Get /apis/v2/metrics

Metrics

HTTPServer

MetricTypeDescriptionLabels
httpserver_healthgaugeshow the status for the http server: 1 for ready, 0 for downclusterName, clusterRole, instanceName, name, kind
httpserver_total_requestscounterthe total count of http requestsclusterName, clusterRole, instanceName, name, kind, routerKind, backend
httpserver_total_responsescounterthe total count of http resposnesclusterName, clusterRole, instanceName, name, kind, routerKind, backend
httpserver_total_error_requestscounterthe total count of http error requestsclusterName, clusterRole, instanceName, name, kind, routerKind, backend
httpserver_requests_durationhistogramrequest processing duration histogramclusterName, clusterRole, instanceName, name, kind, routerKind, backend
httpserver_requests_size_byteshistograma histogram of the total size of the request. Includes bodyclusterName, clusterRole, instanceName, name, kind, routerKind, backend
httpserver_responses_size_byteshistograma histogram of the total size of the returned responses bodyclusterName, clusterRole, instanceName, name, kind, routerKind, backend
httpserver_requests_duration_percentagesummaryrequest processing duration summaryclusterName, clusterRole, instanceName, name, kind, routerKind, backend
httpserver_requests_size_bytes_percentagesummarya summary of the total size of the request. Includes bodyclusterName, clusterRole, instanceName, name, kind, routerKind, backend
httpserver_responses_size_bytes_percentagesummarya summary of the total size of the returned responses bodyclusterName, clusterRole, instanceName, name, kind, routerKind, backend

Proxy Filter

MetricTypeDescriptionLabels
proxy_total_connectionscounterthe total count of proxy connectionsclusterName, clusterRole, instanceName, name, kind, loadBalancePolicy, filterPolicy
proxy_total_error_connectionscounterthe total count of proxy error connectionsclusterName, clusterRole, instanceName, name, kind, loadBalancePolicy, filterPolicy
proxy_request_body_sizehistograma histogram of the total size of the requestclusterName, clusterRole, instanceName, name, kind, loadBalancePolicy, filterPolicy
proxy_response_body_sizehistograma histogram of the total size of the responseclusterName, clusterRole, instanceName, name, kind, loadBalancePolicy, filterPolicy
proxy_request_body_size_percentagesummarya summary of the total size of the requestclusterName, clusterRole, instanceName, name, kind, loadBalancePolicy, filterPolicy
proxy_response_body_size_percentagesummarya summary of the total size of the responseclusterName, clusterRole, instanceName, name, kind, loadBalancePolicy, filterPolicy

Create Metrics for Extended Resources and Filters

We provide several helper functions to help you create Prometheus metrics when develop your own Resources and Filters.

  • prometheushelper.NewCounter
  • prometheushelper.NewGauge
  • prometheushelper.NewHistogram
  • prometheushelper.NewSummary

These metrics will be registered to DefaultRegisterer automatically.

Besides, you can use native Prometheus SDK to create metrics and register them by yourself.