sipcapture / homer-app

HOMER 7.x Front-End and API Server
http://sipcapture.io
GNU Affero General Public License v3.0
204 stars 79 forks source link

Problem with queries to Loki from Homer #439

Closed Shkiperon closed 2 years ago

Shkiperon commented 2 years ago

Hi, I have an issue with homer-app 1.4.11 - when I run LogQL query {job="asterisk",hostname="asterisk1"} |~ "888555000111" from the window with call flow I get a lot of rows that look like a full export from my Loki database. When I run the same query from the Grafana panel in my dashboard, I get 2 rows with the result I am looking for.

In the dump I see that Homer-App and Grafana are making different queries.

Homer-App: http://10.10.1.98:3100/loki/api/v1/query_range?end=1631879031000000000&limit=100&query=%7Bjob%3D%22asterisk%22%2Chostname%3D%22asterisk1%22%7D&regexp=~+%22888555000111%22&start=1631875431000000000 image

Grafana: http://10.10.1.98:3100/loki/api/v1/query_range?direction=BACKWARD&limit=1000&query=%7Bjob%3D%22asterisk%22%2Chostname%3D%22asterisk1%22%7D%20%7C~%20%22888555000111%22&start=1631875484000000000&end=1631879084000000000&step=2 image

As you can see - the queries are the same in the beginning, but different in the GET requests to the Loki database. How to fix this problem?

lmangani commented 2 years ago

Thanks for the report. Fix in progress.

adubovikov commented 2 years ago

homer-app-1.4.12 should have the fix for it. Please install and confirm

Shkiperon commented 2 years ago

Now it works correct. Thank you for help :smiley: