Skip to content

[Aegis] GraphQL Explorer in Aegis analytics docs #23681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 111 additions & 1 deletion src/content/docs/aegis/analytics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ Use the [GraphQL API](/analytics/graphql-api/) to get aggregate data and monitor

<Render file="concurrent-connections-explainer" />

Refer to the GraphQL Analytics API documentation to [get started](/analytics/graphql-api/getting-started/). The specific Aegis schema is called `aegisIpUtilizationAdaptiveGroups`.
Refer to the [GraphQL Analytics API documentation](/analytics/graphql-api/getting-started/) for further guidance, or consider the [example](#example) below for a quickstart.

## Aegis schema

The specific Aegis schema is called `aegisIpUtilizationAdaptiveGroups`.

You can get average (`avg`) or maximum (`max`) utilization values (in percentage), and use the following dimensions:

Expand All @@ -29,3 +33,109 @@ You can get average (`avg`) or maximum (`max`) utilization values (in percentage

- `popUtilizationKey` <Type text="string" />
- The Cloudflare point of presence (PoP), the Aegis IP, and the origin IP and port. For example, `sjc 192.0.2.1 203.0.113.150:443`.

## Example

Refer to the query below to learn how to get average utilization and maximum utilization by point of presence, and filter the results.

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.

```graphql graphql-api-explorer "popName: "<CLOUDFLARE_POP>"" "egressIp: "<YOUR_EGRESS_IP>"" "origin: "<ORIGIN_IP_AND_PORT>""
query AegisIpUtilizationQuery(
$accountTag: string
$datetimeStart: string
$datetimeEnd: string
) {
viewer {
utilization: accounts(filter: { accountTag: $accountTag }) {
avgByPopUtilization: aegisIpUtilizationAdaptiveGroups(
limit: 100
filter: {
datetimeFiveMinutes_geq: $datetimeStart
datetimeFiveMinutes_leq: $datetimeEnd
}
orderBy: [datetimeFiveMinutes_ASC]
) {
avg {
utilization
}
dimensions {
datetimeFiveMinutes
popUtilizationKey
}
}

maxByPopUtilization: aegisIpUtilizationAdaptiveGroups(
limit: 100
filter: {
datetimeFiveMinutes_geq: $datetimeStart
datetimeFiveMinutes_leq: $datetimeEnd
}
orderBy: [datetimeFiveMinutes_ASC]
) {
max {
utilization
}
dimensions {
datetimeFiveMinutes
popUtilizationKey
}
}

filterPopUtilization: aegisIpUtilizationAdaptiveGroups(
limit: 100
filter: {
datetimeFiveMinutes_geq: $datetimeStart
datetimeFiveMinutes_leq: $datetimeEnd
popName: "<CLOUDFLARE_POP>"
}
orderBy: [datetimeFiveMinutes_ASC]
) {
max {
utilization
}
dimensions {
datetimeFiveMinutes
popUtilizationKey
}
}

filterIPUtilization: aegisIpUtilizationAdaptiveGroups(
limit: 100
filter: {
datetimeFiveMinutes_geq: $datetimeStart
datetimeFiveMinutes_leq: $datetimeEnd
egressIp: "<YOUR_EGRESS_IP>"
}
orderBy: [datetimeFiveMinutes_ASC]
) {
max {
utilization
}
dimensions {
datetimeFiveMinutes
popUtilizationKey
}
}

filterOriginUtilization: aegisIpUtilizationAdaptiveGroups(
limit: 100
filter: {
datetimeFiveMinutes_geq: $datetimeStart
datetimeFiveMinutes_leq: $datetimeEnd
origin: "<ORIGIN_IP_AND_PORT>"
}
orderBy: [datetimeFiveMinutes_ASC]
) {
max {
utilization
}
dimensions {
datetimeFiveMinutes
popUtilizationKey
}
}
}
}
}
```
Loading