Commit 4866d23f authored by Marek Grabowski's avatar Marek Grabowski

Merge pull request #19057 from gmarek/log_monitoring

Print errors in log_size_monitoring and increase polling interval
parents 68cb50e7 95825a5b
...@@ -30,7 +30,7 @@ import ( ...@@ -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 { ...@@ -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 { ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment