File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ func newContainerdContainerHandler(
164
164
// Add the name and bare ID as aliases of the container.
165
165
handler .image = cntr .Image
166
166
167
- if includedMetrics .Has (container .DiskUsageMetrics ) {
167
+ if includedMetrics .Has (container .DiskUsageMetrics ) && cntr . Labels [ "io.cri-containerd.kind" ] != "sandbox" {
168
168
handler .fsHandler = common .NewFsHandler (common .DefaultPeriod , & fsUsageProvider {
169
169
ctx : ctx ,
170
170
client : client ,
@@ -228,7 +228,7 @@ func (h *containerdContainerHandler) getFsStats(stats *info.ContainerStats) erro
228
228
common .AssignDeviceNamesToDiskStats ((* common .MachineInfoNamer )(mi ), & stats .DiskIo )
229
229
}
230
230
231
- if ! h .includedMetrics .Has (container .DiskUsageMetrics ) {
231
+ if ! h .includedMetrics .Has (container .DiskUsageMetrics ) || h . labels [ "io.cri-containerd.kind" ] == "sandbox" {
232
232
return nil
233
233
}
234
234
You can’t perform that action at this time.
0 commit comments