Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Loki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Loki
Commits
e510889d
Commit
e510889d
authored
6 years ago
by
Xiang Dai
Browse files
Options
Downloads
Patches
Plain Diff
Update logcli doc
Signed-off-by:
Xiang Dai
<
764524258@qq.com
>
parent
e6bf5487
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/logcli.md
+27
-1
27 additions, 1 deletion
docs/logcli.md
with
27 additions
and
1 deletion
docs/logcli.md
+
27
−
1
View file @
e510889d
...
...
@@ -2,10 +2,31 @@
Loki's main query interface is Grafana; however, a basic CLI is provided as a proof of concept.
Once you have Loki running in a cluster, you can query logs from that cluster using the following commands:
Once you have Loki running in a cluster, you can query logs from that cluster.
## Installation
### Get newest version
```
$ go get github.com/grafana/loki/cmd/logcli
```
### Build by yourself
```
$ go get github.com/grafana/loki
$ cd $GOPATH/github.com/grafana/loki
$ go build ./cmd/logcli
```
Now
`logcli`
is in your current directory.
## Usage
### Example
```
$ export GRAFANA_ADDR=https://logs-us-west1.grafana.net
$ export GRAFANA_USERNAME=<username>
$ export GRAFANA_PASSWORD=<password>
...
...
@@ -20,6 +41,9 @@ Common labels: {job="cortex-ops/consul", namespace="cortex-ops"}
2018-06-25T12:52:09Z {instance="consul-8576459955-pl75w"} 2018/06/25 12:52:09 [INFO] raft: Snapshot to 475409 complete
2018-06-25T12:52:09Z {instance="consul-8576459955-pl75w"} 2018/06/25 12:52:09 [INFO] raft: Compacting logs from 456973 to 465169
```
### Configuration
You may use
`--config=path/to/file`
to load configuration options from a file. For an example file see
`cmd/logcli/logcli-config.yaml`
Configuration values are considered in the following order (lowest to highest):
...
...
@@ -29,6 +53,8 @@ Configuration values are considered in the following order (lowest to highest):
The URLs of the requests are printed to help with integration work.
### Detail
```
$ logcli help
usage: logcli [<flags>] <command> [<args> ...]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment