Merge pull request #19057 from gmarek/log_monitoring

Print errors in log_size_monitoring and increase polling interval
This commit is contained in:
Marek Grabowski 2015-12-23 13:22:09 +01:00
commit 4866d23fbf

View File

@ -30,7 +30,7 @@ import (
const ( const (
// Minimal period between polling log sizes from components // Minimal period between polling log sizes from components
pollingPeriod = 5 * time.Second pollingPeriod = 60 * time.Second
workersNo = 5 workersNo = 5
kubeletLogsPath = "/var/log/kubelet.log" kubeletLogsPath = "/var/log/kubelet.log"
kubeProxyLogsPath = "/var/log/kube-proxy.log" kubeProxyLogsPath = "/var/log/kube-proxy.log"
@ -211,7 +211,7 @@ func (g *LogSizeGatherer) Work() bool {
testContext.Provider, testContext.Provider,
) )
if err != nil { if err != nil {
Logf("Error while trying to SSH to %v, skipping probe.", workItem.ip) Logf("Error while trying to SSH to %v, skipping probe. Error: %v", workItem.ip, err)
g.workChannel <- workItem g.workChannel <- workItem
return true return true
} }
@ -222,7 +222,7 @@ func (g *LogSizeGatherer) Work() bool {
path := results[i] path := results[i]
size, err := strconv.Atoi(results[i+1]) size, err := strconv.Atoi(results[i+1])
if err != nil { if err != nil {
Logf("Error during conversion to int: %v, skipping data", results[i+1]) Logf("Error during conversion to int: %v, skipping data. Error: %v", results[i+1], err)
continue continue
} }
g.data.AddNewData(workItem.ip, path, now, size) g.data.AddNewData(workItem.ip, path, now, size)