Skip to content

Commit

Permalink
Removed Loki plugin because it was causing me some problems in VM and…
Browse files Browse the repository at this point in the history
… I wasn't getting all that much value out of it anyway.
  • Loading branch information
dmuth committed Nov 14, 2022
1 parent 4479d9a commit e056f7a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 42 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ Docker normally writes standard output from its containers to a file. However,
can also be sent somewhere else... such as Loki. Even the output from Loki can be sent back to itself!
Here's how to do that:

- First, install the Docker plugin to talk to Loki:
- `docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions`
- Now, make a copy of `docker-compose.override.yml.sample` to `docker-compose.override.yml`:
- `cp -v docker-compose.override.yml.sample docker-compose.override.yml`
- `docker-compose.override.yml` is excluded with `.gitignore` so changes made be made to it.
Expand All @@ -179,7 +177,17 @@ Here's how to do that:
- Click `Upload JSON file` and navgiate to the file `config/log-volume-dashboard.json`, then click `Import`.
- The dashboard should now show a breakdown of all log volumes.

More about how to configure the Docker Loki plugin [can be read here](https://grafana.com/docs/loki/latest/clients/docker-driver/configuration/).

## FAQ: After rebuilding the machine, I see strange behavior in Grafana, such as "Frontend not running"

I've experienced this myself, and I haven't been able to reliably reproduce it, but a few things seem
to have helped:

- Removing/adding the data source for Loki in Grafana
- Going to the bottom of the configuration page for the Loki data source, and clicking "Save and Test"
- Editing each graph in Grafana, going into the query, and hitting "ctrl-enter" to resubmit the query. Yes, that seems weird to me too.

I expect to update this section as I perform more troubleshooting over the life of this app.


## Additional Considerations
Expand Down
16 changes: 12 additions & 4 deletions config/loki-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# Documentation: https://grafana.com/docs/loki/latest/configuration/
#
# To make changes effective, restart Loki with:
#
# docker-compose restart loki
#
auth_enabled: false

server:
Expand All @@ -9,11 +16,12 @@ ingester:
enabled: true
dir: /tmp/wal
#
# Create checkpoints every minute. I wouldn't normally do this in production,
# but for testing/dev where I could be slamming in a bunch of events all at once
# for testing purposes, I don't want to have huge WALs floating around if I can help it.
# How often to create checkpoints?
#
checkpoint_duration: 1m
# I used to have this at 1 minute, but it was creating an insane amount of files
# which caused other performance problems. Feel free to tweak this.
#
checkpoint_duration: 5m
lifecycler:
address: 127.0.0.1
ring:
Expand Down
38 changes: 3 additions & 35 deletions docker-compose.override.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,16 @@ version: "3"
#
# Be sure to run:
#
# ln -s docker-compose.override.yml.sample docker-compose.override.yml
# cp docker-compose.override.yml.sample docker-compose.override.yml
#
# ...if you want this file to be used.
#
services:
logs:
logging:
driver: loki
options:
loki-url: http://loki:3100/loki/api/v1/push

ping:
#environment:
#HOSTS: "google.com amazon.com google-dns-4 google-dns-8 quad9-dns internal-192-168-1-1 internal-10-0-0-1"
logging:
driver: loki
options:
loki-url: http://loki:3100/loki/api/v1/push
environment:
HOSTS: "google.com amazon.com google-dns-4 google-dns-8 quad9-dns internal-192-168-1-1 internal-10-0-0-1"

promtail:
logging:
driver: loki
options:
loki-url: http://loki:3100/loki/api/v1/push

telegraf:
logging:
driver: loki
options:
loki-url: http://loki:3100/loki/api/v1/push

loki:
logging:
driver: loki
options:
loki-url: http://loki:3100/loki/api/v1/push

grafana:
logging:
driver: loki
options:
loki-url: http://loki:3100/loki/api/v1/push



0 comments on commit e056f7a

Please sign in to comment.