-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce requests per LB pool metric & fix LB pool health status met…
…ric (#65) * fix: Report LB pool health properly The `cloudflare_zone_pool_health_status` metric introduced with goal to report the actual pools health status during the time, regardless if this pool is the selected one or not. The initial implementation uses the `loadBalancingRequestsAdaptiveGroups` type which returns aggregated Load Balancing origin requests with adaptive sampling and contains information only about the selectedPool (Name, Health, AvgRttMs, etc), rather than for all LB pools. This leads on reporthing back the status only of the selectedPool (which normally is always 1) and not the overall status of all LB's pools. According to Cloudflare's documentation about LoadBalancing GraphQL Analytics API[1], the `loadBalancingRequestsAdaptive` schema can be used to fetch analytics about the Raw Load Balancing origin requests with adaptive sampling. These analytics exposes infromation about the selected pool like: * Selected Pool - Name/Health/ID/Average RTT * Session Affinity - Type/Status But it also exposes information about LB's pools and origins regardless the selection decision, like: * Pools ID/Name/Health/Average RTT/Selected * Origins Name/FQDN/Ipv4/Ipv6/Selected The latter metrics can be used to report the health of all pools associated with account's LBs. For this reason, this commit adds the required `loadBalancingRequestsAdaptive` schema struct on the lbResp struct and configures it as the source for the `cloudflare_zone_pool_health_status` metric. 1. https://developers.cloudflare.com/load-balancing/reference/load-balancing-analytics/#graphql-analytics * feat: Add poolRequestsTotal metric This commit introduces a prometheus counter metric about the total number of requests per pool.
- Loading branch information
1 parent
3034d18
commit b6871aa
Showing
3 changed files
with
92 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters