-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: promtail loki grafana setup #264
feat: promtail loki grafana setup #264
Conversation
0c9cb20
to
3426d49
Compare
|
||
grafana: | ||
image: grafana/grafana | ||
user: "${UID:-root}:${GID:-root}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when starting the docker, we would provide UID
and GID
env vars
- ./grafana/sources_provision.yml:/etc/grafana/provisioning/datasources/all.yml # for some reason does not work if volumed into /usr/share/grafana/conf/provisioning/datasources | ||
- ./grafana/data:/var/lib/grafana | ||
ports: | ||
- "3001:3000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's necessary to expose port 3000 from grafana to embed it in tauri
ok, so - this is a working docker-compose with promtail/loki/grafana with provisioned loki |
networks: | ||
loki: | ||
|
||
services: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possibly loki and promtail will also need persistent volumes for whatever data/db/indexes they create
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be hooked into the launchpad container setup. We could create volumes for these, sure.
promtail: | ||
image: grafana/promtail | ||
volumes: | ||
- ~/.cache/tari/tmp/:/var/log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this volume definition needs to change depending on OS - promtail config file assumes logs in /var/log, but different host directories will have to be mounted per OS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Again, the docker-compose file will be superceded by launchpad, which can dynamically configure these things
cookie_samesite = lax | ||
|
||
# set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false. | ||
allow_embedding = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the most important change in comparison to a default defaults.ini
(and the only one)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Next step is to bring this into the launchpad setup
networks: | ||
loki: | ||
|
||
services: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be hooked into the launchpad container setup. We could create volumes for these, sure.
promtail: | ||
image: grafana/promtail | ||
volumes: | ||
- ~/.cache/tari/tmp/:/var/log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Again, the docker-compose file will be superceded by launchpad, which can dynamically configure these things
Yes, exactly. |
Description
run with
docker-compose -f docker-compose.grafana.yml up -d
(you might need to change volume in docker-compose if running on macOS)
Motivation and Context
#11
How Has This Been Tested?