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
c1aa93d3
Commit
c1aa93d3
authored
6 years ago
by
Tom Wilkie
Browse files
Options
Downloads
Patches
Plain Diff
Add usage instructions.
Signed-off-by:
Tom Wilkie
<
tom.wilkie@gmail.com
>
parent
cd8bb0f1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+66
-0
66 additions, 0 deletions
README.md
env
+3
-0
3 additions, 0 deletions
env
with
69 additions
and
0 deletions
README.md
+
66
−
0
View file @
c1aa93d3
...
...
@@ -5,3 +5,69 @@
Logish is a horizontally-scalable, highly-available, multi-tenant, log aggregation
system inspired by Prometheus. It is design to be very cost effective, as it does
not index the contents of the logs, but rather a set of labels for each log steam.
## Usage Instructions
Logish is running in the ops-tools1 cluster. You can query logs from that cluster
using the following commands:
```
$ go get github.com/grafana/logish/cmd/logcli
$ . $GOPATH/src/github.com/grafana/logish/env # env vars inc. URL, username etc
$ logcli labels job
https://logs-dev-ops-tools1.grafana.net/api/prom/label/job/values
cortex-ops/consul
cortex-ops/cortex-gw
...
$ logcli query '{job="cortex-ops/consul"}'
https://logs-dev-ops-tools1.grafana.net/api/prom/query?query=%7Bjob%3D%22cortex-ops%2Fconsul%22%7D&limit=30&start=1529928228&end=1529931828&direction=backward®exp=
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
```
The
`logcli`
command is temporary until we have Grafana integration. The URLs of
the requests are printed to help with integration work.
```
$ logcli help
usage: logcpi [<flags>] <command> [<args> ...]
A command-line for logish.
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--addr="https://log-us.grafana.net"
Server address.
--username="" Username for HTTP basic auth.
--password="" Password for HTTP basic auth.
Commands:
help [<command>...]
Show help.
query [<flags>] <query> [<regex>]
Run a LogQL query.
labels <label>
Find values for a given label.
$ logcli help query
usage: logcpi query [<flags>] <query> [<regex>]
Run a LogQL query.
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--addr="https://log-us.grafana.net"
Server address.
--username="" Username for HTTP basic auth.
--password="" Password for HTTP basic auth.
--limit=30 Limit on number of entries to print.
--since=1h Lookback window.
--forward Scan forwards through logs.
Args:
<query> eg '{foo="bar",baz="blip"}'
[<regex>]
```
This diff is collapsed.
Click to expand it.
env
0 → 100755
+
3
−
0
View file @
c1aa93d3
export GRAFANA_ADDR=https://logs-dev-ops-tools1.grafana.net
export GRAFANA_USERNAME=29
export GRAFANA_PASSWORD=eyJrIjoiMzJmNDRjYjI1NGI1MGUxODc3NmIzNjhlZjRkM2QzMWE5OWU4ZjllZSIsIm4iOiJ0b20tcHJvbS10ZXN0IiwiaWQiOjUwMDB9
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