fix container list option

This commit is contained in:
nerves_dev
2021-03-11 01:42:27 +09:00
parent 439c45f7a1
commit 33e928e380
+2 -1
View File
@@ -132,8 +132,9 @@ func (c *dockerHealthCollector) collectMetrics(ch chan<- prometheus.Metric) {
ch <- prometheus.MustNewConstMetric(restartcountDesc.Desc(labels), prometheus.GaugeValue, float64(info.RestartCount))
}
}
func (c *dockerHealthCollector) collectContainer() {
containers, err := c.containerClient.ContainerList(context.Background(), types.ContainerListOptions{})
containers, err := c.containerClient.ContainerList(context.Background(), types.ContainerListOptions{All: true})
errCheck(err)
c.containerInfoCache = []types.ContainerJSON{}