Can't understand logcli filtering

Hi,

This query returns the single row that I expect:

logcli -q query '{container="cms-api",namespace="building-blocks"} |= "4b7f5f1dcacb9005"' -o jsonl | grep getAll

but this does not:

logcli -q query '{namespace="building-blocks"} |= "4b7f5f1dcacb9005"' -o jsonl | grep getAll

The only difference is removing the filter on the container label.

Am I missing something?

$ logcli --version
logcli, version 2.2.1 (branch: HEAD, revision: babea82e)
  build user:       root@e2d295b84e26
  build date:       2021-04-06T00:52:41Z
  go version:       go1.15.3
  platform:         linux/amd64

Thanks

Jim

Ah, I’ve just worked it out.
It needs --limit to be set (after “query”).
This works:

logcli -q query --limit 100 '{namespace="building-blocks"} |= "4b7f5f1dcacb9005"' -o jsonl | grep getAll

and this also works:

logcli -q query '{namespace="building-blocks"} |= "4b7f5f1dcacb9005" |= "getAll"' -o jsonl

Hi @yaytay
Glad you worked it out!

So I assume, the problem was without --limit, that particular row you were interested in was not visible.

Can you mark this as resolved? Thanks!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.