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
cachePeriod=time.Duration(*flag.Int("cache-period", 1, "The period of time the collector will reuse the results of docker inspect before polling again, in seconds" )) *time.Second
cachePeriod=time.Duration(*flag.Int("cache-period", 1, "The period of time the collector will reuse the results of docker inspect before polling again, in seconds")) *time.Second
192
+
flag.BoolVar(&addContainerLabels, "add-container-labels", true, "Add labels from docker containers as metric labels")
188
193
}
189
194
190
195
funcmain() {
191
196
flag.Parse()
192
197
193
-
client, err:=client.NewEnvClient()
198
+
client, err:=client.NewClientWithOpts()
194
199
errCheck(err)
195
200
deferclient.Close()
196
201
@@ -235,4 +240,4 @@ func main() {
235
240
errorLogger.Log("message", fmt.Sprintf("Failed to gracefully shutdown: %v", err))
0 commit comments