Project: k8gb (Orchestration & Management / Coordination & Service Discovery)
File: metrics.md

K8GB generates -compatible metrics. Metrics endpoints are exposed via `-metrics` service in operator namespace and can be scraped by 3rd party tools: ``` yaml spec: ... ports: name: http-metrics port: 8383 protocol: TCP targetPort: 8383 name: cr-metrics port: 8686 protocol: TCP targetPort: 8686 ``` Metrics can be also automatically discovered and monitored by via automatically generated CRDs , in case if is deployed into the cluster. standard metrics, extended with K8GB operator-specific metrics listed below: Number of healthy records observed by K8GB. Example: ```yaml k8gbgslbhealthy_records{name="test-gslb",namespace="test-gslb"} 6 ``` Number of ingress hosts per status (NotFound, Healthy, Unhealthy), observed by K8GB. Example: ```yaml k8gbgslbingresshostsper_status{name="test-gslb",namespace="test-gslb",status="Healthy"} 1 k8gbgslbingresshostsper_status{name="test-gslb",namespace="test-gslb",status="NotFound"} 1 k8gbgslbingresshostsper_status{name="test-gslb",namespace="test-gslb",status="Unhealthy"} 2 ``` Served on `0.0.0.0:8383/metrics` endpoint Info metrics, automatically exposed by operator based on the number of the current instances of an operator's custom resources in the cluster. Example: ```yaml gslb_info{namespace="test-gslb",gslb="test-gslb"} 1 ``` Served on `0.0.0.0:8686/metrics` endpoint The k8gb exposes several metrics to help you monitor the health and behavior. | Metric | Type | Description | Labels | ||::||| | `k8gbgslberrors_total` | Counter | Number of errors | `namespace`, `name` | | `k8gbgslbhealthy_records` | Gauge | Number of healthy records observed by k8gb. | `namespace`, `name` | | `k8gbgslbreconciliationloopstotal` | Counter | Number of successful reconciliation loops. | `namespace`, `name` | | `k8gbgslbservicestatusnum` | Gauge | Number of managed hosts observed by k8gb. | `namespace`, `name`, `status` | | `k8gbgslbstatuscountfor_failover` | Gauge | Gslb status count for Failover strategy. | `namespace`, `name`, `status` | | `k8gbgslbstatuscountfor_geoip` | Gauge | Gslb status count for GeoIP strategy. | `namespace`, `name`, `status` | | `k8gbgslbstatuscountfor_roundrobin` | Gauge | Gslb status count for RoundRobin strategy. | `namespace`, `name`, `status` | | `k8gbinfobloxheartbeaterrorstotal` | Counter | Number of k8gb Infoblox TXT record errors. | `namespace`, `name` | | `k8gbinfobloxheartbeats_total` | Counter | Number of k8gb Infoblox heartbeat TXT record updates. | `namespace`, `name` | | `k8gbinfobloxrequest_duration` | Histogram | Duration of the HTTP request to Infoblox API in seconds. | `request`, `success` | | `k8gbinfobloxzoneupdateerrors_total` | Counter | Number of k8gb Infoblox zone update errors. | `namespace`, `name` | | `k8gbinfobloxzoneupdatestotal` | Counter | Number of k8gb Infoblox zone updates. | `namespace`, `name` | | `k8gbendpointstatusnum` | Gauge | Number of targets in DNS endpoint. | `namespace`, `name`, `dnsname` | | `k8gbruntimeinfo` | Gauge | K8gb runtime info. | `namespace`, `k8gbversion`, <br>`goversion`, `arch`, `os`, `git_sha` | Optionally k8gb operator can expose traces in OpenTelemetry format to any available OTEL compliant tracing solution. Consult the for more details.