Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upHow to get Kubernetes log messages from inside Prometheus? #3236
Comments
This comment has been minimized.
This comment has been minimized.
|
In the 2.0 branch we are overwriting the error handler and handle the logging of errors from the k8s code base ourselves: https://github.com/prometheus/prometheus/blob/dev-2.0/cmd/prometheus/main.go#L205-L212 |
This comment has been minimized.
This comment has been minimized.
|
That appears to be yet another thing. I'm talking about for instance https://github.com/prometheus/prometheus/blob/dev-2.0/vendor/k8s.io/client-go/tools/cache/reflector.go#L236 |
This comment has been minimized.
This comment has been minimized.
|
I see, ultimately, this is a severe mis-design of Kubernetes libraries in general and we currently don't and cannot provide flags for a basically arbitrarily chosen and unswappable logging libraryies somewhere in our dependencies. Why are you interested in seeing those debug logs? |
This comment has been minimized.
This comment has been minimized.
|
Got an error from discovery; didn't understand it; wanted more context what the k8s library was doing. More specifically it was a customer running the program so I preferred to say "run with |
This comment has been minimized.
This comment has been minimized.
|
Yes, that's right. It would be great to just show those messages when debug logging is enabled but with k8s' current approach I don't see a sane way for us to do it =/ |
brian-brazil
added
component/service discovery
kind/enhancement
priority/P3
priority/Pmaybe
and removed
priority/P3
labels
Oct 23, 2017
This comment has been minimized.
This comment has been minimized.
|
Request to fix Kubernetes http://github.com/kubernetes/kubernetes/issues/61006 |
bboreham commentedOct 3, 2017
prometheus/discovery/kubernetescalls Kubernetes code; Kubernetes code logs viaglog; there doesn't seem to be a way to set the glog level inside Prometheus.glog does set up command-line options like
-vviaflag.Var(), but because nobody is callingflag.Parse()they don't help.