Project: Spiderpool (Runtime / Cloud Native Network)
File: metrics.md

Spiderpool can be configured to serve metrics. And spiderpool metrics provide the insight of Spiderpool Agent and Spiderpool Controller. The metrics of spiderpool controller is set by the following pod environment: | environment | description | default | ||-| - | | SPIDERPOOLENABLEDMETRIC | enable metrics | false | | SPIDERPOOLENABLEDDEBUG_METRIC | enable debug level metrics | false | | SPIDERPOOLMETRICHTTP_PORT | metrics port | 5721 | The metrics of spiderpool agent is set by the following pod environment: | environment | description | default | ||-|| | SPIDERPOOLENABLEDMETRIC | enable metrics | false | | SPIDERPOOLENABLEDDEBUG_METRIC | enable debug level metrics | false | | SPIDERPOOLMETRICHTTP_PORT | metrics port | 5711 | Check the environment variable `SPIDERPOOLENABLEDMETRIC` of the daemonset `spiderpool-agent` for whether it is already set to `true` or not. Check the environment variable `SPIDERPOOLENABLEDMETRIC` of deployment `spiderpool-controller` for whether it is already set to `true` or not. ```shell kubectl -n kube-system get daemonset spiderpool-agent -o yaml kubectl -n kube-system get deployment spiderpool-controller -o yaml ``` You can set one or both of them to `true`. For example, let's enable spiderpool agent metrics by running `helm upgrade --set spiderpoolAgent.prometheus.enabled=true`. Spiderpool agent exports some metrics related with IPAM allocation and

Currently, those include: | Name | description | |--|--| | spiderpoolipamallocation_counts | Number of IPAM allocation requests that Spiderpool Agent received , prometheus type: counter | | spiderpoolipamallocationfailurecounts | Number of Spiderpool Agent IPAM allocation failures, prometheus type: counter | | spiderpoolipamallocationupdateippoolconflictcounts | Number of Spiderpool Agent IPAM allocation update IPPool conflicts, prometheus type: counter | | spiderpoolipamallocationerrinternal_counts | Number of Spiderpool Agent IPAM allocation internal errors, prometheus type: counter | | spiderpoolipamallocationerrnoavailablepool_counts | Number of Spiderpool Agent IPAM allocation no available IPPool errors, prometheus type: counter | | spiderpoolipamallocationerrretriesexhaustedcounts | Number of Spiderpool Agent IPAM allocation retries exhausted errors, prometheus type: counter | | spiderpoolipamallocationerripusedout_counts | Number of Spiderpool Agent IPAM allocation IP addresses used out errors, prometheus type: counter | | spiderpoolipamallocationaverageduration_seconds | The average duration of all Spiderpool Agent allocation processes, prometheus type: gauge | | spiderpoolipamallocationmaxduration_seconds | The maximum duration of Spiderpool Agent allocation process (per-process), prometheus type: gauge | | spiderpoolipamallocationminduration_seconds | The minimum duration of Spiderpool Agent allocation process (per-process), prometheus type: gauge | | spiderpoolipamallocationlatestduration_seconds | The latest duration of Spiderpool Agent allocation process (per-process), prometheus type: gauge | | spiderpoolipamallocationdurationseconds | Histogram of IPAM allocation duration in seconds, prometheus type: histogram | | spiderpoolipamallocationaveragelimitdurationseconds | The average duration of all Spiderpool Agent allocation queuing, prometheus type: gauge | | spiderpoolipamallocationmaxlimitdurationseconds | The maximum duration of Spiderpool Agent allocation queuing, prometheus type: gauge | | spiderpoolipamallocationminlimitdurationseconds | The minimum duration of Spiderpool Agent allocation queuing, prometheus type: gauge | | spiderpoolipamallocationlatestlimitdurationseconds | The latest duration of Spiderpool Agent allocation queuing, prometheus type: gauge | | spiderpoolipamallocationlimitduration_seconds | Histogram of IPAM allocation queuing duration in seconds, prometheus type: histogram | | spiderpoolipamrelease_counts | Count of the number of Spiderpool Agent received the IPAM release requests, prometheus type: counter | | spiderpoolipamreleasefailurecounts | Number of Spiderpool Agent IPAM release failure, prometheus type: counter | | spiderpoolipamreleaseupdateippoolconflictcounts | Number of Spiderpool Agent IPAM release update IPPool conflicts, prometheus type: counter | | spiderpoolipamreleaseerrinternal_counts | Number of Spiderpool Agent IPAM releasing internal error, prometheus type: counter | | spiderpoolipamreleaseerrretriesexhaustedcounts | Number of Spiderpool Agent IPAM releasing retries exhausted error, prometheus type: counter | | spiderpoolipamreleaseaverageduration_seconds | The average duration of all Spiderpool Agent release processes, prometheus type: gauge | | spiderpoolipamreleasemaxduration_seconds | The maximum duration of Spiderpool Agent release process (per-process), prometheus type: gauge | | spiderpoolipamreleaseminduration_seconds | The minimum duration of Spiderpool Agent release process (per-process), prometheus type: gauge | | spiderpoolipamreleaselatestduration_seconds | The latest duration of Spiderpool Agent release process (per-process), prometheus type: gauge | | spiderpoolipamreleasedurationseconds | Histogram of IPAM release duration in seconds, prometheus type: histogram | | spiderpoolipamreleaseaveragelimitdurationseconds | The average duration of all Spiderpool Agent release queuing, prometheus type: gauge | | spiderpoolipamreleasemaxlimitdurationseconds | The maximum duration of Spiderpool Agent release queuing, prometheus type: gauge | | spiderpoolipamreleaseminlimitdurationseconds | The minimum duration of Spiderpool Agent release queuing, prometheus type: gauge | | spiderpoolipamreleaselatestlimitdurationseconds | The latest duration of Spiderpool Agent release queuing, prometheus type: gauge | | spiderpoolipamreleaselimitduration_seconds | Histogram of IPAM release queuing duration in seconds, prometheus type: histogram | | spiderpooldebugautopoolwaitedforavailable_counts | Number of Spiderpool Agent IPAM allocation wait for auto-created IPPool available, prometheus type: counter. (debug level metric) | Spiderpool controller exports some metrics related with SpiderIPPool IP garbage collection. Currently, those include: | Name | description | |--|--| | spiderpoolipgc_counts | Number of Spiderpool Controller IP garbage collection, prometheus type: counter. | | spiderpoolipgcfailurecounts | Number of Spiderpool Controller IP garbage collection failures, prometheus type: counter. | | spiderpooltotalippool_counts | Number of Spiderpool IPPools, prometheus type: gauge. | | spiderpooldebugippooltotalip_counts | Number of Spiderpool IPPool corresponding total