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
|
path: metrics
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Copy metrics conf
|
|
||||||
ansible.builtin.copy:
|
|
||||||
src: .
|
|
||||||
dest: metrics/
|
|
||||||
register: metrics_copy_files_results
|
|
||||||
|
|
||||||
- name: Copy template conf
|
- name: Copy template conf
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
|
@ -24,5 +18,5 @@
|
||||||
project_src: metrics
|
project_src: metrics
|
||||||
state: present
|
state: present
|
||||||
pull: true
|
pull: true
|
||||||
restarted: "{{ metrics_copy_files_results.changed or metrics_copy_templates_results.changed }}"
|
restarted: "{{ metrics_copy_templates_results.changed }}"
|
||||||
become: true
|
become: true
|
|
@ -31,6 +31,23 @@ services:
|
||||||
- traefik.http.services.prometheus.loadbalancer.server.port=9090
|
- traefik.http.services.prometheus.loadbalancer.server.port=9090
|
||||||
- traefik.docker.network=proxy
|
- 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:
|
grafana:
|
||||||
image: grafana/grafana:latest
|
image: grafana/grafana:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -40,8 +57,13 @@ services:
|
||||||
- {{ server.work_dir }}/grafana/provisioning:/etc/grafana/provisioning
|
- {{ server.work_dir }}/grafana/provisioning:/etc/grafana/provisioning
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
env_file:
|
environment:
|
||||||
- grafana.env
|
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:
|
depends_on:
|
||||||
- prometheus
|
- prometheus
|
||||||
networks:
|
networks:
|
||||||
|
|
Loading…
Reference in a new issue