Project: Easegress (Orchestration & Management / API Gateway)
File: 7.08.Metrics.md

- Easegress has a builtin Prometheus exporter. ``` Get /apis/v2/metrics ``` | Metric | Type | Description | Labels | |--|--|--|-| | httpserver_health | gauge | show the status for the http server: 1 for ready, 0 for down | clusterName, clusterRole, instanceName, name, kind | | httpservertotalrequests | counter | the total count of http requests | clusterName, clusterRole, instanceName, name, kind, routerKind, backend | | httpservertotalresponses | counter | the total count of http resposnes | clusterName, clusterRole, instanceName, name, kind, routerKind, backend | | httpservertotalerror_requests | counter | the total count of http error requests | clusterName, clusterRole, instanceName, name, kind, routerKind, backend | | httpserverrequestsduration | histogram | request processing duration histogram | clusterName, clusterRole, instanceName, name, kind, routerKind, backend | | httpserverrequestssize_bytes | histogram | a histogram of the total size of the request. Includes body | clusterName, clusterRole, instanceName, name, kind, routerKind, backend | | httpserverresponsessize_bytes | histogram | a histogram of the total size of the returned responses body | clusterName, clusterRole, instanceName, name, kind, routerKind, backend | | httpserverrequestsduration_percentage | summary | request processing duration summary | clusterName, clusterRole, instanceName, name, kind, routerKind, backend | | httpserverrequestssizebytespercentage | summary | a summary of the total size of the request. Includes body | clusterName, clusterRole, instanceName, name, kind, routerKind, backend | | httpserverresponsessizebytespercentage | summary | a summary of the total size of the returned responses body | clusterName, clusterRole, instanceName, name, kind, routerKind, backend | | Metric | Type | Description | Labels | |-|--|--|-| | proxytotalconnections | counter | the total count of proxy connections | clusterName, clusterRole, instanceName, name, kind, loadBalancePolicy, filterPolicy | | proxytotalerror_connections | counter | the total count of proxy error connections | clusterName, clusterRole, instanceName, name, kind, loadBalancePolicy, filterPolicy | | proxyrequestbody_size | histogram | a histogram of the total size of the request | clusterName, clusterRole, instanceName, name, kind, loadBalancePolicy, filterPolicy | | proxyresponsebody_size | histogram | a histogram of the total size of the response | clusterName, clusterRole, instanceName, name, kind, loadBalancePolicy, filterPolicy | | proxyrequestbodysizepercentage | summary | a summary of the total size of the request | clusterName, clusterRole, instanceName, name, kind, loadBalancePolicy, filterPolicy | | proxyresponsebodysizepercentage | summary | a summary of the total size of the response | clusterName, clusterRole, instanceName, name, kind, loadBalancePolicy, filterPolicy | 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.