mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
devenv: use grafana/fluent-plugin-loki
This commit is contained in:
parent
0f40b2d206
commit
7b1249ad47
@ -7,10 +7,6 @@ services:
|
|||||||
- "80:80"
|
- "80:80"
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||||
logging:
|
|
||||||
driver: "fluentd"
|
|
||||||
options:
|
|
||||||
tag: nginx
|
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: mysql:5.6
|
image: mysql:5.6
|
||||||
@ -51,7 +47,7 @@ services:
|
|||||||
# retries: 10
|
# retries: 10
|
||||||
|
|
||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana:dev
|
image: grafana/grafana:6.0.0-beta2
|
||||||
volumes:
|
volumes:
|
||||||
- ./grafana/provisioning/:/etc/grafana/provisioning/
|
- ./grafana/provisioning/:/etc/grafana/provisioning/
|
||||||
environment:
|
environment:
|
||||||
@ -70,6 +66,8 @@ services:
|
|||||||
# - GF_DATABASE_SSL_MODE=disable
|
# - GF_DATABASE_SSL_MODE=disable
|
||||||
# - GF_SESSION_PROVIDER=postgres
|
# - GF_SESSION_PROVIDER=postgres
|
||||||
# - GF_SESSION_PROVIDER_CONFIG=user=grafana password=password host=db port=5432 dbname=grafana sslmode=disable
|
# - GF_SESSION_PROVIDER_CONFIG=user=grafana password=password host=db port=5432 dbname=grafana sslmode=disable
|
||||||
|
- GF_SERVER_ROUTER_LOGGING=true
|
||||||
|
- GF_LOG_CONSOLE_FORMAT=json
|
||||||
- GF_LOG_FILTERS=alerting.notifier:debug,alerting.notifier.slack:debug,auth:debug
|
- GF_LOG_FILTERS=alerting.notifier:debug,alerting.notifier.slack:debug,auth:debug
|
||||||
- GF_AUTH_TOKEN_ROTATION_INTERVAL_MINUTES=2
|
- GF_AUTH_TOKEN_ROTATION_INTERVAL_MINUTES=2
|
||||||
ports:
|
ports:
|
||||||
@ -100,9 +98,9 @@ services:
|
|||||||
command: -config.file=/etc/loki/local-config.yaml
|
command: -config.file=/etc/loki/local-config.yaml
|
||||||
|
|
||||||
fluentd:
|
fluentd:
|
||||||
build: ./fluentd
|
image: grafana/fluent-plugin-loki:master
|
||||||
volumes:
|
volumes:
|
||||||
- ./fluentd/fluent.conf:/fluentd/etc/fluent.conf
|
- ./fluentd/fluentd.conf:/fluentd/etc/fluentd.conf
|
||||||
links:
|
links:
|
||||||
- loki
|
- loki
|
||||||
ports:
|
ports:
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
FROM fluent/fluentd:v1.3.3-debian-1.0
|
|
||||||
|
|
||||||
# USER root
|
|
||||||
|
|
||||||
# RUN apk add --no-cache --update --virtual .build-deps \
|
|
||||||
# sudo build-base ruby-dev \
|
|
||||||
# && sudo gem install bundler \
|
|
||||||
# && gem 'loki', git: 'https://github.com/grafana/loki.git', glob: 'fluentd/fluent-plugin-loki/*.gemspec' \
|
|
||||||
# && sudo gem sources --clear-all \
|
|
||||||
# && apk del .build-deps \
|
|
||||||
# && rm -rf /home/fluent/.gem/ruby/2.5.0/cache/*.gem
|
|
||||||
|
|
||||||
# USER fluent
|
|
||||||
|
|
||||||
USER root
|
|
||||||
|
|
||||||
COPY Gemfile .
|
|
||||||
RUN ["gem", "install", "fluent-plugin-loki"]
|
|
||||||
|
|
||||||
# RUN apt-get -y update \
|
|
||||||
# && apt-get -y install git \
|
|
||||||
# && apt-get clean \
|
|
||||||
# && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man/?? /usr/share/man/??_*
|
|
||||||
|
|
||||||
# RUN gem install bundler \
|
|
||||||
# && bundler install
|
|
||||||
|
|
||||||
# COPY fluent.conf /fluentd/etc
|
|
||||||
|
|
||||||
USER fluent
|
|
@ -1 +0,0 @@
|
|||||||
source 'https://rubygems.org'
|
|
@ -4,15 +4,12 @@
|
|||||||
bind 0.0.0.0
|
bind 0.0.0.0
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
<match **>
|
<match grafana>
|
||||||
@type stdout
|
|
||||||
format json
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<match **>
|
|
||||||
@type loki
|
@type loki
|
||||||
endpoint_url "http://loki:3100"
|
url "http://loki:3100"
|
||||||
labels {"env":"dev"}
|
extra_labels {"app":"grafana"}
|
||||||
|
label_keys "container_name,container_id"
|
||||||
|
line_format "json"
|
||||||
flush_interval 10s
|
flush_interval 10s
|
||||||
flush_at_shutdown true
|
flush_at_shutdown true
|
||||||
buffer_chunk_limit 1m
|
buffer_chunk_limit 1m
|
@ -37,3 +37,11 @@ scrape_configs:
|
|||||||
type: 'A'
|
type: 'A'
|
||||||
port: 9104
|
port: 9104
|
||||||
refresh_interval: 10s
|
refresh_interval: 10s
|
||||||
|
|
||||||
|
- job_name: 'loki'
|
||||||
|
dns_sd_configs:
|
||||||
|
- names:
|
||||||
|
- 'loki'
|
||||||
|
type: 'A'
|
||||||
|
port: 3100
|
||||||
|
refresh_interval: 10s
|
Loading…
Reference in New Issue
Block a user