api icon indicating copy to clipboard operation
api copied to clipboard

Logs Gateway corrupts query

Open theSuess opened this issue 3 years ago • 2 comments

I found this issue in the openshift-logging platform and traced it back to this component.

My example query of { kubernetes_namespace_name="some-namespace" } | json | level = "error" fails with the error

parse error at line 1, col 2002: syntax error: unexpected STRING

Tracing back lead me to the label enforcer, which somehow corrupts this query. In the debug logs i found that the query:

{log_type=~".+", kubernetes_namespace_name=~"<injected namespaces>"} | json | "error|err|eror"

is being sent upstream, meaning that we're losing the level field selector somewhere.

Hope I'm in the right place, but I'm not sure how to debug this further.

theSuess avatar Nov 18 '22 13:11 theSuess

cc @periklis

philipgough avatar Dec 14 '22 09:12 philipgough

You are looking probably at this fix: #422 422

periklis avatar Dec 14 '22 12:12 periklis