Clean useless files + Add loki and promtail
This commit is contained in:
parent
fd9bd94d58
commit
488c240089
3 changed files with 25 additions and 15 deletions
|
@ -1,6 +0,0 @@
|
|||
GF_AUTH_ANONYMOUS_ENABLED=true
|
||||
GF_AUTH_BASIC_ENABLED=false
|
||||
GF_AUTH_PROXY_ENABLED=false
|
||||
GF_USERS_ALLOW_SIGN_UP=false
|
||||
GF_INSTALL_PLUGINS=grafana-piechart-panel
|
||||
GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s:%(http_port)s/
|
|
@ -5,12 +5,6 @@
|
|||
path: metrics
|
||||
state: directory
|
||||
|
||||
- name: Copy metrics conf
|
||||
ansible.builtin.copy:
|
||||
src: .
|
||||
dest: metrics/
|
||||
register: metrics_copy_files_results
|
||||
|
||||
- name: Copy template conf
|
||||
ansible.builtin.template:
|
||||
src: "{{ item.src }}"
|
||||
|
@ -24,5 +18,5 @@
|
|||
project_src: metrics
|
||||
state: present
|
||||
pull: true
|
||||
restarted: "{{ metrics_copy_files_results.changed or metrics_copy_templates_results.changed }}"
|
||||
restarted: "{{ metrics_copy_templates_results.changed }}"
|
||||
become: true
|
|
@ -31,6 +31,23 @@ services:
|
|||
- traefik.http.services.prometheus.loadbalancer.server.port=9090
|
||||
- traefik.docker.network=proxy
|
||||
|
||||
loki:
|
||||
image: grafana/loki:latest
|
||||
command: -config.file=/etc/loki/config.yml
|
||||
volumes:
|
||||
- {{ server.work_dir }}/loki/config:/etc/loki
|
||||
networks:
|
||||
- metrics
|
||||
|
||||
promtail:
|
||||
image: grafana/promtail:latest
|
||||
command: -config.file=/etc/promtail/config.yml
|
||||
volumes:
|
||||
- {{ server.work_dir }}/promtail/config:/etc/promtail
|
||||
- /var/log:/var/log
|
||||
networks:
|
||||
- metrics
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
restart: unless-stopped
|
||||
|
@ -40,8 +57,13 @@ services:
|
|||
- {{ server.work_dir }}/grafana/provisioning:/etc/grafana/provisioning
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
env_file:
|
||||
- grafana.env
|
||||
environment:
|
||||
GF_AUTH_ANONYMOUS_ENABLED: "true"
|
||||
GF_AUTH_BASIC_ENABLED: "false"
|
||||
GF_AUTH_PROXY_ENABLED: "false"
|
||||
GF_USERS_ALLOW_SIGN_UP: "false"
|
||||
GF_INSTALL_PLUGINS: grafana-piechart-panel
|
||||
GF_SERVER_ROOT_URL: "%(protocol)s://%(domain)s:%(http_port)s/"
|
||||
depends_on:
|
||||
- prometheus
|
||||
networks:
|
||||
|
|
Loading…
Reference in a new issue