HashiCorp Cloud Platform
Graph explorer
Use the graph explorer to run queries and apply custom filters to understand your infrastructure. To access the graph explorer, click Graph explorer in your HCP organization's left navigation panel.
Run queries
You can use the following methods to run queries in the explorer view:
- Use the query builder UI.
- Run JSON queries.
Use the query builder
Infragraph provides a UI to build queries from the list of resources in your inventory. Complete the following steps to use the UI to build a query:
- Navigate to the Graph explorer.
- Click Add resource type.
- Choose a node type from the Resource types list as the root of your traversal.
- Optionally, choose a specific Source type. For example, you can shoose a Virtual Machine resource type, or choose AWS EC2 Instance to be more exact.
- Click Add as resource type.
- Click Add conditional relationship or filter to choose another node type and its relationship, or a property to filter the existing node results.
Run JSON queries
Infragraph provides a JSON-based query language to write your queries as code. Complete the following steps to run JSON queries in the graph explorer:
- Click the
</>button next to the Clear query button. - Write your query in the textbox.
- Click outside of the textbox to run the query.
Refer to the Infragraph query language reference documentation for the full JSON query language specification.
Save queries
After you build a query with the query builder, you can save it and add it to your query catalog. To save a query, complete the following steps:
- In the Graph explorer, above your query, click Save.
- Enter a Name and optional Description.
- Click Save to query catalog.
Graph view
The resource graph visualizes the relationships between resources. These graphs draw lines between related resources to help you understand your environment. You can click a resource node to inspect its details.
Infragraph can visualize resource topography in the following ways:
- Force directed automatically clusters different resources with close relationships
- Stacked by type clusters resources according to their type, stacked vertically.
- Radial organizes resources in a circle to highlight connection volumes and highly connected hubs.
Forced directed
Use this mode to help you understand how your resources relate to one another.
This graph maps the virtual machines and their connected EC2 volumes in a region according to the subnets and VPCs they use. Their distribution in the viewing area approximates how closely the resources relate to one another and helps you understand subbnets and VPCs according the workloads they enable.
Stacked by type
Use this mode to help you understand the relative distribution of resources in your query results.
This graph maps the virtual machines and their connected EC2 volumes in a region according to the subnets and VPCs they use. Their distribution in the viewing area helps you identify VPC and subnet resources specifically by separating them from other resources.
Radial view
Use this mode to compare connections side-by-side and instantly identify highly connected dependencies.
This graph arranges your infrastructure resources along the outer perimeter of a circle, drawing connection lines across the center. This layout helps you spot critical resources and compare the relational volume and distribution between different resources or resource types.
Table view
Click Table to display results in a table that lists the resource name and its data source. Click a resource's name to inspect resource details.
You can also return a table of connected resources to understand dependencies between resources.
Example source query
The examples in the images on this page were generated with the following query:
{
"edge": {
"absent": false,
"edgeTypes": [
"CONTAINS"
],
"nodeQuery": {
"edge": {
"absent": false,
"edgeTypes": [
"CONTAINS"
],
"nodeQuery": {
"edge": {
"absent": false,
"edgeTypes": [
"CONTAINS"
],
"nodeQuery": {
"edge": {
"absent": false,
"edgeTypes": [
"ATTACHES_TO"
],
"direction": "INCOMING",
"nodeQuery": {
"edge": {
"absent": false,
"edgeTypes": [
"CONTAINS"
],
"direction": "INCOMING",
"nodeQuery": {
"node": {
"unifiedTypes": [
"ZONE"
]
}
}
},
"node": {
"unifiedTypes": [
"VOLUME"
]
}
}
},
"node": {
"unifiedTypes": [
"VIRTUAL_MACHINE"
]
}
}
},
"node": {
"unifiedTypes": [
"SUBNET"
]
}
}
},
"node": {
"unifiedTypes": [
"VIRTUAL_NETWORK"
]
}
}
},
"node": {
"unifiedTypes": [
"REGION"
]
}
}


