You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -165,6 +174,22 @@ class NonInjectedClusterPrometheusSetting extends React.Component<ClusterPrometh
165
174
</section>
166
175
</>
167
176
)}
177
+
<>
178
+
<hr/>
179
+
<section>
180
+
<SubTitletitle="Filesystem mountpoints"/>
181
+
<Input
182
+
theme="round-black"
183
+
value={this.mountpoints}
184
+
onChange={(value)=>this.mountpoints=value}
185
+
onBlur={this.onSaveMountpoints}
186
+
placeholder="/"
187
+
/>
188
+
<smallclassName="hint">
189
+
{`A regexp for the label with the filesystem mountpoints that will create a graph for disk usage. For the root disk only use "/" and for all disks use ".*".`}
return`sum(kube_node_status_allocatable{resource="cpu"}) by (node)`;
74
74
case"fsSize":
75
-
return`sum(node_filesystem_size_bytes{mountpoint="/"}) by (kubernetes_node)`;
75
+
return`sum(node_filesystem_size_bytes{mountpoint=~"${opts.mountpoints}"}) by (kubernetes_node)`;
76
76
case"fsUsage":
77
-
return`sum(node_filesystem_size_bytes{mountpoint="/"} - node_filesystem_avail_bytes{mountpoint="/"}) by (kubernetes_node)`;
77
+
return`sum(node_filesystem_size_bytes{mountpoint=~"${opts.mountpoints}"} - node_filesystem_avail_bytes{mountpoint=~"${opts.mountpoints}"}) by (kubernetes_node)`;
0 commit comments