Configure loki

* Add a minio installation step in README
 * Add loki configuration variables in .env.sample
 * Make loki.yml a go template and use environment variables
This commit is contained in:
mirsal 2021-07-19 14:31:12 +00:00
parent d5607c39cd
commit f080ffd38a
4 changed files with 18 additions and 10 deletions

View File

@ -12,3 +12,9 @@ LETS_ENCRYPT_ENV=production
#GF_SECURITY_ALLOW_EMBEDDING
#GF_INSTALL_PLUGINS=grafana-piechart-panel
#GF_SERVER_ROOT_URL=https://${GRAFANA_DOMAIN}
LOKI_AWS_ENDPOINT
LOKI_AWS_REGION
LOKI_ACCESS_KEY_ID
LOKI_SECRET_ACCESS_KEY
LOKI_BUCKET_NAMES

View File

@ -17,12 +17,13 @@ A server and application monitoring stack based on Prometheus, Loki and Grafana.
1. Set up Docker Swarm and [`abra`]
2. Deploy [`coop-cloud/traefik`]
3. `abra app new monitoring --secrets` (optionally with `--pass` if you'd like
3. Deploy [`coop-cloud/minio`]
4. `abra app new monitoring --secrets` (optionally with `--pass` if you'd like
to save secrets in `pass`)
4. `abra app YOURAPPDOMAIN config` - be sure to change `GRAFANA_DOMAIN` and `PROMETHEUS_DOMAIN` to something that resolves to
5. `abra app YOURAPPDOMAIN config` - be sure to change `GRAFANA_DOMAIN` and `PROMETHEUS_DOMAIN` to something that resolves to
your Docker swarm box
5. `abra app YOURAPPDOMAIN deploy`
6. Open the configured domain in your browser to finish set-up
6. `abra app YOURAPPDOMAIN deploy`
7. Open the configured domain in your browser to finish set-up
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
[`coop-cloud/traefik`]: https://git.autonomic.zone/coop-cloud/traefik

View File

@ -144,8 +144,9 @@ configs:
name: ${STACK_NAME}_promtail_yml_${PROMTAIL_YML_VERSION}
file: promtail.yml
loki_yml:
template_driver: golang
name: ${STACK_NAME}_loki_yml_${LOKI_YML_VERSION}
file: loki.yml
file: loki.yml.tmpl
node_exporter_entrypoint_sh:
name: ${STACK_NAME}_node_exporter_entrypoint_${NODE_EXPORTER_ENTRYPOINT_VERSION}
file: node-exporter-entrypoint.sh

View File

@ -52,11 +52,11 @@ storage_config:
shared_store: aws
aws:
endpoint:
region:
access_key_id:
secret_access_key:
bucketnames:
endpoint: {{ env LOKI_AWS_ENDPOINT }}
region: {{ env LOKI_AWS_REGION }}
access_key_id: {{ env LOKI_ACCESS_KEY_ID }}
secret_access_key: {{ env LOKI_SECRET_ACCESS_KEY }}
bucketnames: {{ env_LOKI_BUCKET_NAMES }}
insecure: false
sse_encryption: false
http_config: