drop line if can't parse
This commit is contained in:
parent
2232a748db
commit
d28a4bec05
@ -22,9 +22,10 @@ func (unparsed RawC) parse(parsed chan<- singleLine) {
|
||||
if err := line.parse(); err != nil {
|
||||
promRecordPrefixParsingErr.WithLabelValues(raw.MetricsName).Add(1)
|
||||
log.Printf("parsing kubernetes log line in %q: %e", raw.File.Path, err)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
// TODO: should this only be on success?
|
||||
parsed <- line
|
||||
}
|
||||
}
|
||||
|
@ -30,9 +30,9 @@ var App = &cli.App{
|
||||
//
|
||||
//TODO: &cli.BoolFlag{Name: "normalize-log-level", Usage: "Normalize log.level values to Syslog defined keywords"},
|
||||
//TODO: &cli.BoolFlag{Name: "parse-json"},
|
||||
// TODO:
|
||||
&cli.StringFlag{Category: "k8s metadata", Name: "pod-namespace", EnvVars: []string{"KUBE_POD_NAMESPACE"}},
|
||||
&cli.StringFlag{Category: "k8s metadata", Name: "node-name", EnvVars: []string{"KUBE_NODE_NAME"}, Required: true},
|
||||
//
|
||||
// &cli.StringFlag{Category: "k8s metadata", Name: "pod-namespace", EnvVars: []string{"KUBE_POD_NAMESPACE"}},
|
||||
// &cli.StringFlag{Category: "k8s metadata", Name: "node-name", EnvVars: []string{"KUBE_NODE_NAME"}, Required: true},
|
||||
//
|
||||
&cli.StringFlag{Category: "secrets", Name: "mongo-uri", EnvVars: []string{"MONGO_URI"}, Usage: "mongodb://foo:bar@host:27017/database", Required: true},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user