Handle empty IO result
This commit is contained in:
@@ -203,6 +203,10 @@ class ContainerCollector(BaseCollector):
|
||||
blkio_stats = stats.get('blkio_stats', {})
|
||||
io_service_bytes = blkio_stats.get('io_service_bytes_recursive', [])
|
||||
|
||||
# Handle case where io_service_bytes might be None
|
||||
if io_service_bytes is None:
|
||||
io_service_bytes = []
|
||||
|
||||
read_bytes = 0
|
||||
write_bytes = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user