Skip to content

Feat: Infrastructure Disk Usage #10262

Open
nikhilmantri0902 wants to merge 14 commits intomainfrom
feat/infra_disk_usage
Open

Feat: Infrastructure Disk Usage #10262
nikhilmantri0902 wants to merge 14 commits intomainfrom
feat/infra_disk_usage

Conversation

@nikhilmantri0902
Copy link
Contributor

@nikhilmantri0902 nikhilmantri0902 commented Feb 10, 2026

Pull Request


📄 Summary

Why does this change exist?

Today the infrastructure tab, doesnt show out of the box information on disk/filesystem usage

What problem does it solve, and why is this the right approach?

  1. In order to check the host's disk usage, we will be showing disk usage % of the host using the otel metric system.filesystem.usage in the host lists page.
  2. We will also be showing this bar in the sidedrawer
  3. In the sidedrawer we will also display a time series graph of disk usage split by the selected host's mounpoints.

Screenshots / Screen Recordings (if applicable)

Include screenshots or screen recordings that clearly show the behavior before the change and the result after the change. This helps reviewers quickly understand the impact and verify the update.

Screenshot 2026-02-12 at 1 29 10 PM 2. Screenshot 2026-02-12 at 1 29 47 PM
Screenshot 2026-02-12 at 1 30 24 PM

Issues closed by this PR

Reference issues using Closes #issue-number to enable automatic closure on merge.
Closes #https://github.com/SigNoz/engineering-pod/issues/2591


✅ Change Type

Select all that apply

  • ✨ Feature

🧪 Testing Strategy

How was this change validated?

  • Manual verification

⚠️ Risk & Impact Assessment

What could break? How do we recover?

  • Blast radius: Infrastructure tab, host lists API and the sidedrawer
  • Potential regressions:
  • Rollback plan:

📝 Changelog

Fill only if this affects users, APIs, UI, or documented behavior
Use N/A for internal or non-user-facing changes

Field Value
Deployment Type Cloud + OSS + Enterprise
Change Type Feature
Description User will get to see out of the box info on filesystem usage

📋 Checklist

  • Tests added or explicitly not required
  • Manually tested
  • Breaking changes documented
  • Backward compatibility considered

👀 Notes for Reviewers


Note

Medium Risk
Adds a new filesystem field to the host list API and extends query-building logic (new formula/queries and step handling), which could affect sorting/results and query load for infra monitoring screens.

Overview
Adds host disk usage support end-to-end: the hosts list API/model now includes a filesystem utilization value and supports sorting by it, and the Infra Monitoring UI surfaces it as a new “Disk Usage” column plus a progress bar in the host side drawer.

Extends host metrics queries to include a disk-usage time series split by mountpoint (via system.filesystem.usage) and updates host metric query payloads to use stepInterval: 0 so the backend derives the effective step from the selected time range. Related frontend types/styles and tests are updated accordingly.

Written by Cursor Bugbot for commit 28e38ba. This will update automatically on new commits. Configure here.

@nikhilmantri0902 nikhilmantri0902 requested a review from a team as a code owner February 10, 2026 07:51
@nikhilmantri0902 nikhilmantri0902 marked this pull request as draft February 10, 2026 07:51
@github-actions github-actions bot added the enhancement New feature or request label Feb 10, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Free Tier Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Inconsistent indentation breaks map literal structure readability
    • Corrected indentation of map entries G, H, I, and F4 from 2 tabs to 3 tabs to match the consistent pattern used by other entries in the BuilderQueries map.

Create PR

Or push these changes by commenting:

@cursor push 01bb4a9afe
Preview (01bb4a9afe)
diff --git a/pkg/query-service/app/inframetrics/hosts_query.go b/pkg/query-service/app/inframetrics/hosts_query.go
--- a/pkg/query-service/app/inframetrics/hosts_query.go
+++ b/pkg/query-service/app/inframetrics/hosts_query.go
@@ -269,131 +269,131 @@
 					Items:    []v3.FilterItem{},
 				},
 			},
-		"G": {
-			QueryName:  "G",
-			DataSource: v3.DataSourceMetrics,
-			AggregateAttribute: v3.AttributeKey{
-				Key:      metricNamesForHosts["load15"],
-				DataType: v3.AttributeKeyDataTypeFloat64,
-			},
-			Temporality: v3.Unspecified,
-			Filters: &v3.FilterSet{
-				Operator: "AND",
-				Items: []v3.FilterItem{
-					{
-						Key: v3.AttributeKey{
-							Key:      hostNameAttrKey,
-							DataType: v3.AttributeKeyDataTypeString,
-							Type:     v3.AttributeKeyTypeResource,
+			"G": {
+				QueryName:  "G",
+				DataSource: v3.DataSourceMetrics,
+				AggregateAttribute: v3.AttributeKey{
+					Key:      metricNamesForHosts["load15"],
+					DataType: v3.AttributeKeyDataTypeFloat64,
+				},
+				Temporality: v3.Unspecified,
+				Filters: &v3.FilterSet{
+					Operator: "AND",
+					Items: []v3.FilterItem{
+						{
+							Key: v3.AttributeKey{
+								Key:      hostNameAttrKey,
+								DataType: v3.AttributeKeyDataTypeString,
+								Type:     v3.AttributeKeyTypeResource,
+							},
+							Operator: v3.FilterOperatorNotContains,
+							Value:    agentNameToIgnore,
 						},
-						Operator: v3.FilterOperatorNotContains,
-						Value:    agentNameToIgnore,
 					},
 				},
+				GroupBy: []v3.AttributeKey{
+					{
+						Key:      hostNameAttrKey,
+						DataType: v3.AttributeKeyDataTypeString,
+						Type:     v3.AttributeKeyTypeResource,
+					},
+				},
+				Expression:       "G",
+				ReduceTo:         v3.ReduceToOperatorAvg,
+				TimeAggregation:  v3.TimeAggregationAvg,
+				SpaceAggregation: v3.SpaceAggregationSum,
+				Disabled:         false,
+				Legend:           "CPU Load Average (15m)",
 			},
-			GroupBy: []v3.AttributeKey{
-				{
-					Key:      hostNameAttrKey,
-					DataType: v3.AttributeKeyDataTypeString,
-					Type:     v3.AttributeKeyTypeResource,
+			"H": {
+				QueryName:  "H",
+				DataSource: v3.DataSourceMetrics,
+				AggregateAttribute: v3.AttributeKey{
+					Key:      metricNamesForHosts["filesystem"],
+					DataType: v3.AttributeKeyDataTypeFloat64,
 				},
-			},
-			Expression:       "G",
-			ReduceTo:         v3.ReduceToOperatorAvg,
-			TimeAggregation:  v3.TimeAggregationAvg,
-			SpaceAggregation: v3.SpaceAggregationSum,
-			Disabled:         false,
-			Legend:           "CPU Load Average (15m)",
-		},
-		"H": {
-			QueryName:  "H",
-			DataSource: v3.DataSourceMetrics,
-			AggregateAttribute: v3.AttributeKey{
-				Key:      metricNamesForHosts["filesystem"],
-				DataType: v3.AttributeKeyDataTypeFloat64,
-			},
-			Temporality: v3.Cumulative,
-			Filters: &v3.FilterSet{
-				Operator: "AND",
-				Items: []v3.FilterItem{
-					{
-						Key: v3.AttributeKey{
-							Key:      "state",
-							DataType: v3.AttributeKeyDataTypeString,
-							Type:     v3.AttributeKeyTypeTag,
+				Temporality: v3.Cumulative,
+				Filters: &v3.FilterSet{
+					Operator: "AND",
+					Items: []v3.FilterItem{
+						{
+							Key: v3.AttributeKey{
+								Key:      "state",
+								DataType: v3.AttributeKeyDataTypeString,
+								Type:     v3.AttributeKeyTypeTag,
+							},
+							Operator: v3.FilterOperatorEqual,
+							Value:    "used",
 						},
-						Operator: v3.FilterOperatorEqual,
-						Value:    "used",
+						{
+							Key: v3.AttributeKey{
+								Key:      hostNameAttrKey,
+								DataType: v3.AttributeKeyDataTypeString,
+								Type:     v3.AttributeKeyTypeResource,
+							},
+							Operator: v3.FilterOperatorNotContains,
+							Value:    agentNameToIgnore,
+						},
 					},
+				},
+				GroupBy: []v3.AttributeKey{
 					{
-						Key: v3.AttributeKey{
-							Key:      hostNameAttrKey,
-							DataType: v3.AttributeKeyDataTypeString,
-							Type:     v3.AttributeKeyTypeResource,
-						},
-						Operator: v3.FilterOperatorNotContains,
-						Value:    agentNameToIgnore,
+						Key:      hostNameAttrKey,
+						DataType: v3.AttributeKeyDataTypeString,
+						Type:     v3.AttributeKeyTypeResource,
 					},
 				},
+				Expression:       "H",
+				ReduceTo:         v3.ReduceToOperatorAvg,
+				TimeAggregation:  v3.TimeAggregationAvg,
+				SpaceAggregation: v3.SpaceAggregationSum,
+				Disabled:         true,
 			},
-			GroupBy: []v3.AttributeKey{
-				{
-					Key:      hostNameAttrKey,
-					DataType: v3.AttributeKeyDataTypeString,
-					Type:     v3.AttributeKeyTypeResource,
+			"I": {
+				QueryName:  "I",
+				DataSource: v3.DataSourceMetrics,
+				AggregateAttribute: v3.AttributeKey{
+					Key:      metricNamesForHosts["filesystem"],
+					DataType: v3.AttributeKeyDataTypeFloat64,
 				},
-			},
-			Expression:       "H",
-			ReduceTo:         v3.ReduceToOperatorAvg,
-			TimeAggregation:  v3.TimeAggregationAvg,
-			SpaceAggregation: v3.SpaceAggregationSum,
-			Disabled:         true,
-		},
-		"I": {
-			QueryName:  "I",
-			DataSource: v3.DataSourceMetrics,
-			AggregateAttribute: v3.AttributeKey{
-				Key:      metricNamesForHosts["filesystem"],
-				DataType: v3.AttributeKeyDataTypeFloat64,
-			},
-			Temporality: v3.Cumulative,
-			Filters: &v3.FilterSet{
-				Operator: "AND",
-				Items: []v3.FilterItem{
-					{
-						Key: v3.AttributeKey{
-							Key:      hostNameAttrKey,
-							DataType: v3.AttributeKeyDataTypeString,
-							Type:     v3.AttributeKeyTypeResource,
+				Temporality: v3.Cumulative,
+				Filters: &v3.FilterSet{
+					Operator: "AND",
+					Items: []v3.FilterItem{
+						{
+							Key: v3.AttributeKey{
+								Key:      hostNameAttrKey,
+								DataType: v3.AttributeKeyDataTypeString,
+								Type:     v3.AttributeKeyTypeResource,
+							},
+							Operator: v3.FilterOperatorNotContains,
+							Value:    agentNameToIgnore,
 						},
-						Operator: v3.FilterOperatorNotContains,
-						Value:    agentNameToIgnore,
 					},
 				},
+				GroupBy: []v3.AttributeKey{
+					{
+						Key:      hostNameAttrKey,
+						DataType: v3.AttributeKeyDataTypeString,
+						Type:     v3.AttributeKeyTypeResource,
+					},
+				},
+				Expression:       "I",
+				ReduceTo:         v3.ReduceToOperatorAvg,
+				TimeAggregation:  v3.TimeAggregationAvg,
+				SpaceAggregation: v3.SpaceAggregationSum,
+				Disabled:         true,
 			},
-			GroupBy: []v3.AttributeKey{
-				{
-					Key:      hostNameAttrKey,
-					DataType: v3.AttributeKeyDataTypeString,
-					Type:     v3.AttributeKeyTypeResource,
+			"F4": {
+				QueryName:  "F4",
+				Expression: "H/I",
+				Legend:     "Disk Usage (%)",
+				Filters: &v3.FilterSet{
+					Operator: "AND",
+					Items:    []v3.FilterItem{},
 				},
 			},
-			Expression:       "I",
-			ReduceTo:         v3.ReduceToOperatorAvg,
-			TimeAggregation:  v3.TimeAggregationAvg,
-			SpaceAggregation: v3.SpaceAggregationSum,
-			Disabled:         true,
 		},
-		"F4": {
-			QueryName:  "F4",
-			Expression: "H/I",
-			Legend:     "Disk Usage (%)",
-			Filters: &v3.FilterSet{
-				Operator: "AND",
-				Items:    []v3.FilterItem{},
-			},
-		},
-		},
 		PanelType: v3.PanelTypeTable,
 		QueryType: v3.QueryTypeBuilder,
 	},
This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Operator: "AND",
Items: []v3.FilterItem{},
},
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation breaks map literal structure readability

Low Severity

Entries "G" through "F4" in the BuilderQueries map are at 2-tab indentation while entries "A" through "F3" remain at 3-tab indentation. This makes the map literal visually confusing — the new entries appear to be at the same level as BuilderQueries itself rather than nested inside it. The consecutive }, on lines 395 and 396 (closing F4 and the map respectively, both at 2 tabs) further obscure the structure. While Go compiles this fine, the inconsistency makes the code harder to read and maintain.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request staging:fleet-monarch staging:quiet-buffalo Amlan's Environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants