Error using logcli

Hi I try with this important command but I got an error…
I don’t understand why?
logcli series '{job="mysql"}' --analyze-labels

end the err

logcli: error: expected command but got "series", try --help

Naturally others run like:

logcli query '{job="mysql"}'
 logcli labels job

Thanks ALEN

@alencappelletti hi, thanks for the question.

Try swapping the arguments:

logcli series --analyze-labels '{job="mysql"}'
1 Like

Hi danny…
no always the same…

[acap@localhost ~]$ logcli labels job
http://localhost:3100/loki/api/v1/label/job/values
docker
mysql
postgres
sqlserver
sqlservernamed
[acap@localhost ~]$ logcli series --analyze-labels ‘{job=“mysql”}’
logcli: error: expected command but got “series”, try --help

Do you have some ideas about?

Which version of logcli are you using, and on which OS?

This are the details:

logcli, version 1.4.1 (branch: HEAD, revision: 2445ccd2)
  build user:       root@bb5e00b6b7f4
  build date:       2020-04-06T20:29:26Z
  go version:       go1.13.4

this is OS

   Static hostname: localhost.localdomain
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 3017c69a44b34070bc15425610ac4de8
           Boot ID: 778131206d4b4f72b4445874e1987bed
    Virtualization: vmware
  Operating System: Red Hat Enterprise Linux 8.5 (Ootpa)
       CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos
            Kernel: Linux 4.18.0-348.12.2.el8_5.x86_64
      Architecture: x86-64

Please let me know how can you see the specifications of the labels?

Alen

Please update to the latest logcli: Releases · grafana/loki · GitHub
You’re running an almost 2 year old version.

1 Like

Thank you very much Danny…
now it’s ok…

I mistakenly downloaded a wrong version from GitHub and didn’t notice.
Thanks again!
p.s .: is there a version in the docker of logcli? However I installed it on the host.

No problem

And yes we do:
https://hub.docker.com/r/grafana/logcli

1 Like

Hi Danny…
Id downloaded the client directly previously, due to the underlying error

Error response from daemon: manifest for grafana/logcli:latest not found: manifest unknown: manifest unknown

For this reason I was unable to include it in the docker. Is there any action I can take to elude the message?

Thanks Alen

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