Skip to content
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

How to download cpln logs in bulk #56

Open
dzirtusss opened this issue Jun 13, 2023 · 0 comments
Open

How to download cpln logs in bulk #56

dzirtusss opened this issue Jun 13, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@dzirtusss
Copy link
Collaborator

Default cpln client has several restrictions on logs downloading, at least:

  • qty of lines is 5000 max
  • maxContentLength size of 524288 bytes

To bulk download logs it is needed to:

  1. Install logcli from https://grafana.com/docs/loki/latest/tools/logcli/ e.g. as brew install logcli on macos
  2. export LOKI_ADDR=https://logs.cpln.io/logs/org/YOUR_ORG
  3. export LOKI_BEARER_TOKEN=$(cpln profile token)
  4. logcli query '{gvc="...", workload="...", ... }' --since 1h -- limit XXX

as well useful option is --no-labels

@justin808 justin808 added the enhancement New feature or request label Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants