-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
line_parser.go:158: cannot parse docker message, invalid JSON: #1000
Conversation
…//127.0.0.1:10250/pods, status code: 200, body len: 153223
…valid character when use containerd CRI
@@ -134,7 +134,9 @@ func (kc *kubeletClient) query(ctx context.Context, path string) ([]byte, int, e | |||
return nil, 0, err | |||
} | |||
|
|||
log.Printf("Successfully queried %s, status code: %d, body len: %d", req.URL.String(), response.StatusCode, len(b)) | |||
if coreconfig.Config.DebugMode { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有个单独针对logs-agent的debug 判断 util.Debug()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经修改了。
logs/input/kubernetes/launcher.go
Outdated
@@ -200,6 +200,10 @@ func (l *Launcher) addSource(svc *service.Service) { | |||
// force setting source type to kubernetes | |||
source.SetSourceType(logsconfig.KubernetesSourceType) | |||
|
|||
// Determine whether CRI uses containerd | |||
if pod.Status.Containers[0].ID[:13] == "containerd://" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里会不会panic ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不好意思。 第一次写golang, 不是很熟悉。也修改了。这样应该不会panic了。
Thank you @2005wind |
Fix 在containerd日志格式下,错误日志匹配。以及query 日志太多