Skip to content

Commit

Permalink
docs(logcli): clarify usage of GRAFANA_ADDR (grafana#822)
Browse files Browse the repository at this point in the history
Adds an example of how to setup the `GRAFANA_ADDR` environment variable when not using Grafana Cloud but rather a local or otherwise hosted instance of Loki
  • Loading branch information
adityacs authored and sh0rez committed Jul 31, 2019
1 parent 459e4e3 commit 9fe1a8f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/logcli.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,19 @@ Now `logcli` is in your current directory.

### Example

If you are running on Grafana cloud, use:
```
$ export GRAFANA_ADDR=https://logs-us-west1.grafana.net
$ export GRAFANA_USERNAME=<username>
$ export GRAFANA_PASSWORD=<password>
```
Otherwise, when running e.g. [locally](https://github.com/grafana/loki/tree/master/production#run-locally-using-docker), point it to your Loki instance:
```
$ export GRAFANA_ADDR=http://localhost:3100
```
> Note: If you are running loki behind a proxy server and have an authentication setup. You will have to pass URL, username and password accordingly. Please refer to the [docs](https://github.com/adityacs/loki/blob/master/docs/operations.md) for more info.
```
$ logcli labels job
https://logs-dev-ops-tools1.grafana.net/api/prom/label/job/values
cortex-ops/consul
Expand Down

0 comments on commit 9fe1a8f

Please sign in to comment.