1

I am checking the loki query_range api

with this script:

> curl -vv -G -s  "http://192.168.1.5:3100/loki/api/v1/query_range" \  
> --data-urlencode 'query={job="bot_android"}' \   --data-urlencode 'start=2022-11-01T23:36:13+00:00' \   --data-urlencode  
> 'end=2022-12-02T23:36:14+00:00' | jq

if I change start to 2022-11-10T23:36:13+00:00 I get:

> "result": [
>       {
>         "stream": {
>           "filename": "/var/log/pruebalog",
>           "fingerprint": "execution",
>           "job": "bot_android",
>           "serial": "2022-03-01"
>         },
>         "values": [
>           [
>             "1669862173612667344",
>             "something=another_data integer=123456789"
>           ],
>           [
>             "1669862173610958379",
>             "value=one text=string"
>           ]
>         ]
>       }
>     ],

if I change start to 2022-11-01T23:36:13+00:00 I get an error:

parse error: Invalid literal at line 1, column 4

I only push a log line today 2022-12-01 with [loki push api][2]:

enter image description here

When I filter a range about a month it takes several second it works so slow.

Thank you.

Raul Cejas
  • 399
  • 4
  • 13

0 Answers0