-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Logcli field regex does not return results #3436
Comments
ohhhh wait maybe this is it: https://prometheus.io/docs/prometheus/latest/querying/basics/ Vector selectors must either specify a name or at least one label matcher that does not match the empty string. The following expression is illegal:
That's reallly weird..... |
I had other problems with it too, I'll have to go back and test this again. |
ah |
What's also weird is if |
Workaround : use |
I found the reason - the newline in the log is messing things up. |
and here's the other part of the puzzle - the prometheus docs say |
and the last thing I found is if I want |
to prevent people from running into grafana#3436
to prevent people from running into #3436
Describe the bug
Logcli field regex behaves in very strange ways contrary to expectation
To Reproduce
Steps to reproduce the behavior:
logcli query '{app="nginx",job="fifteen5/nginx"} | json | log=~".*"'
Expected behavior
All nginx logs to be returned.
Environment:
Screenshots, Promtail config, or terminal output
If applicable, add any output to help explain your problem.
The same query on a different field worked:
logcli query '{app="nginx",job="fifteen5/nginx"} | json | stream=~".*"'
Using an exact match works:
{app="nginx",job="fifteen5/nginx"} | json | log="10.51.82.226 - - [04/Mar/2021:01:33:52 +0000] \"GET / HTTP/1.1\" 404 118 \"-\" \"ELB-HealthChecker/2.0\"\n"
Here's an example of the log line that should be showing up:
{"log":"10.51.82.226 - - [04/Mar/2021:01:33:52 +0000] \"GET / HTTP/1.1\" 404 118 \"-\" \"ELB-HealthChecker/2.0\"\n","stream":"stdout","time":"2021-03-04T01:33:52.615363491Z"}
The text was updated successfully, but these errors were encountered: