Browse Source

Publish empty stats on error

Signed-off-by: John Howard <jhoward@microsoft.com>
John Howard 6 years ago
parent
commit
0a30ef4c59
1 changed files with 4 additions and 0 deletions
  1. 4 0
      daemon/stats/collector.go

+ 4 - 0
daemon/stats/collector.go

@@ -143,6 +143,10 @@ func (s *Collector) Run() {
 
 			default:
 				logrus.Errorf("collecting stats for %s: %v", pair.container.ID, err)
+				pair.publisher.Publish(types.StatsJSON{
+					Name: pair.container.Name,
+					ID:   pair.container.ID,
+				})
 			}
 		}
 	}