|
| 1 | +--- |
| 2 | +title: IPs utilization |
| 3 | +pcx_content_type: reference |
| 4 | +sidebar: |
| 5 | + order: 7 |
| 6 | +--- |
| 7 | + |
| 8 | +import { Type, Render } from "~/components"; |
| 9 | + |
| 10 | +Use the [GraphQL API](/analytics/graphql-api/) to get aggregate data and monitor your dedicated IPs capacity (formerly known as Aegis). |
| 11 | + |
| 12 | +<Render file="concurrent-connections-explainer" product="aegis" /> |
| 13 | + |
| 14 | +Refer to the [GraphQL Analytics API documentation](/analytics/graphql-api/getting-started/) for further guidance, or consider the [example](#example) below for a quickstart. |
| 15 | + |
| 16 | +## GraphQL schema |
| 17 | + |
| 18 | +The specific schema to get Dedicated CDN Egress IPs data is called `aegisIpUtilizationAdaptiveGroups`. |
| 19 | + |
| 20 | +You can get average (`avg`) or maximum (`max`) utilization values (in percentage), and use the following dimensions: |
| 21 | + |
| 22 | +- `datetimeFiveMinutes` <Type text="time" /> |
| 23 | + - Timestamp truncated to five minutes. For example, `2025-01-10T00:05:00Z`. |
| 24 | + |
| 25 | +- `popName` <Type text="string" /> |
| 26 | + - The Cloudflare point of presence (PoP). For example, `sjc`. |
| 27 | + |
| 28 | +- `egressIp` <Type text="string" /> |
| 29 | + - Your assigned Dedicated CDN Egress IP. For example, `192.0.2.1`. |
| 30 | + |
| 31 | +- `origin` <Type text="string" /> |
| 32 | + - Origin IP and port. For example, `203.0.113.150:443`. |
| 33 | + |
| 34 | +- `popUtilizationKey` <Type text="string" /> |
| 35 | + - The Cloudflare point of presence (PoP), the Dedicated CDN Egress IP, and the origin IP and port. For example, `sjc 192.0.2.1 203.0.113.150:443`. |
| 36 | + |
| 37 | +## Example |
| 38 | + |
| 39 | +Refer to the query below to learn how to get average utilization and maximum utilization by point of presence, and filter the results. |
| 40 | + |
| 41 | +You can also select the button at the bottom to use this query for your account via the [Cloudflare GraphQL API Explorer](https://graphql.cloudflare.com/explorer). Make sure to provide your account ID and timestamps, and replace the placeholders for `popName`, `egressIp`, and `origin` as needed. |
| 42 | + |
| 43 | +```graphql graphql-api-explorer "popName: "<CLOUDFLARE_POP>"" "egressIp: "<YOUR_EGRESS_IP>"" "origin: "<ORIGIN_IP_AND_PORT>"" |
| 44 | +query AegisIpUtilizationQuery( |
| 45 | + $accountTag: string |
| 46 | + $datetimeStart: string |
| 47 | + $datetimeEnd: string |
| 48 | +) { |
| 49 | + viewer { |
| 50 | + utilization: accounts(filter: { accountTag: $accountTag }) { |
| 51 | + avgByPopUtilization: aegisIpUtilizationAdaptiveGroups( |
| 52 | + limit: 100 |
| 53 | + filter: { |
| 54 | + datetimeFiveMinutes_geq: $datetimeStart |
| 55 | + datetimeFiveMinutes_leq: $datetimeEnd |
| 56 | + } |
| 57 | + orderBy: [datetimeFiveMinutes_ASC] |
| 58 | + ) { |
| 59 | + avg { |
| 60 | + utilization |
| 61 | + } |
| 62 | + dimensions { |
| 63 | + datetimeFiveMinutes |
| 64 | + popUtilizationKey |
| 65 | + } |
| 66 | + } |
| 67 | + |
| 68 | + maxByPopUtilization: aegisIpUtilizationAdaptiveGroups( |
| 69 | + limit: 100 |
| 70 | + filter: { |
| 71 | + datetimeFiveMinutes_geq: $datetimeStart |
| 72 | + datetimeFiveMinutes_leq: $datetimeEnd |
| 73 | + } |
| 74 | + orderBy: [datetimeFiveMinutes_ASC] |
| 75 | + ) { |
| 76 | + max { |
| 77 | + utilization |
| 78 | + } |
| 79 | + dimensions { |
| 80 | + datetimeFiveMinutes |
| 81 | + popUtilizationKey |
| 82 | + } |
| 83 | + } |
| 84 | + |
| 85 | + filterPopUtilization: aegisIpUtilizationAdaptiveGroups( |
| 86 | + limit: 100 |
| 87 | + filter: { |
| 88 | + datetimeFiveMinutes_geq: $datetimeStart |
| 89 | + datetimeFiveMinutes_leq: $datetimeEnd |
| 90 | + popName: "<CLOUDFLARE_POP>" |
| 91 | + } |
| 92 | + orderBy: [datetimeFiveMinutes_ASC] |
| 93 | + ) { |
| 94 | + max { |
| 95 | + utilization |
| 96 | + } |
| 97 | + dimensions { |
| 98 | + datetimeFiveMinutes |
| 99 | + popUtilizationKey |
| 100 | + } |
| 101 | + } |
| 102 | + |
| 103 | + filterIPUtilization: aegisIpUtilizationAdaptiveGroups( |
| 104 | + limit: 100 |
| 105 | + filter: { |
| 106 | + datetimeFiveMinutes_geq: $datetimeStart |
| 107 | + datetimeFiveMinutes_leq: $datetimeEnd |
| 108 | + egressIp: "<YOUR_EGRESS_IP>" |
| 109 | + } |
| 110 | + orderBy: [datetimeFiveMinutes_ASC] |
| 111 | + ) { |
| 112 | + max { |
| 113 | + utilization |
| 114 | + } |
| 115 | + dimensions { |
| 116 | + datetimeFiveMinutes |
| 117 | + popUtilizationKey |
| 118 | + } |
| 119 | + } |
| 120 | + |
| 121 | + filterOriginUtilization: aegisIpUtilizationAdaptiveGroups( |
| 122 | + limit: 100 |
| 123 | + filter: { |
| 124 | + datetimeFiveMinutes_geq: $datetimeStart |
| 125 | + datetimeFiveMinutes_leq: $datetimeEnd |
| 126 | + origin: "<ORIGIN_IP_AND_PORT>" |
| 127 | + } |
| 128 | + orderBy: [datetimeFiveMinutes_ASC] |
| 129 | + ) { |
| 130 | + max { |
| 131 | + utilization |
| 132 | + } |
| 133 | + dimensions { |
| 134 | + datetimeFiveMinutes |
| 135 | + popUtilizationKey |
| 136 | + } |
| 137 | + } |
| 138 | + } |
| 139 | + } |
| 140 | +} |
| 141 | +``` |
0 commit comments