Compare commits
3 Commits
main
...
feat/grafa
| Author | SHA1 | Date | |
|---|---|---|---|
| 4d1b273335 | |||
| 2c68489c2f | |||
| b2ea764b96 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@ log.html
|
|||||||
node_modules/
|
node_modules/
|
||||||
./front/coverage
|
./front/coverage
|
||||||
.venv
|
.venv
|
||||||
|
grafana/.data
|
||||||
|
|||||||
16
grafana/datasource.yml
Normal file
16
grafana/datasource.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# config file version
|
||||||
|
apiVersion: 1
|
||||||
|
|
||||||
|
deleteDatasources:
|
||||||
|
- name: loki
|
||||||
|
|
||||||
|
datasources:
|
||||||
|
- name: loki
|
||||||
|
type: loki
|
||||||
|
access: proxy
|
||||||
|
orgId: 1
|
||||||
|
url: http://loki:3100
|
||||||
|
basicAuth: false
|
||||||
|
isDefault: true
|
||||||
|
version: 1
|
||||||
|
editable: false
|
||||||
43
grafana/docker-compose.yaml
Normal file
43
grafana/docker-compose.yaml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
version: "3.4"
|
||||||
|
|
||||||
|
services:
|
||||||
|
my-nginx-service:
|
||||||
|
image: nginx
|
||||||
|
container_name: my-nginx-service
|
||||||
|
ports:
|
||||||
|
- 8000:80
|
||||||
|
environment:
|
||||||
|
- FOO=bar
|
||||||
|
logging:
|
||||||
|
driver: loki
|
||||||
|
options:
|
||||||
|
loki-url: http://loki:3100/loki/api/v1/push
|
||||||
|
loki-external-labels: job=dockerlogs,environment=development
|
||||||
|
|
||||||
|
grafana:
|
||||||
|
image: grafana/grafana:7.2.2
|
||||||
|
container_name: grafana
|
||||||
|
volumes:
|
||||||
|
- ./datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
|
||||||
|
loki:
|
||||||
|
image: grafana/loki:2.8.2
|
||||||
|
container_name: loki
|
||||||
|
volumes:
|
||||||
|
- ./loki.yaml:/etc/config/loki.yaml
|
||||||
|
entrypoint:
|
||||||
|
- /usr/bin/loki
|
||||||
|
- -config.file=/etc/config/loki.yaml
|
||||||
|
ports:
|
||||||
|
- "3100:3100"
|
||||||
|
|
||||||
|
logger-app:
|
||||||
|
image: mingrammer/flog
|
||||||
|
container_name: logger
|
||||||
|
logging:
|
||||||
|
driver: loki
|
||||||
|
options:
|
||||||
|
loki-url: http://loki:3100/loki/api/v1/push
|
||||||
|
loki-external-labels: job=dockerlogs,environment=development
|
||||||
54
grafana/loki.yaml
Normal file
54
grafana/loki.yaml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
auth_enabled: false
|
||||||
|
|
||||||
|
server:
|
||||||
|
http_listen_port: 3100
|
||||||
|
|
||||||
|
ingester:
|
||||||
|
lifecycler:
|
||||||
|
address: 127.0.0.1
|
||||||
|
ring:
|
||||||
|
kvstore:
|
||||||
|
store: inmemory
|
||||||
|
replication_factor: 1
|
||||||
|
final_sleep: 0s
|
||||||
|
chunk_idle_period: 5m
|
||||||
|
chunk_retain_period: 30s
|
||||||
|
|
||||||
|
schema_config:
|
||||||
|
configs:
|
||||||
|
- from: 2018-04-15
|
||||||
|
store: boltdb
|
||||||
|
object_store: filesystem
|
||||||
|
schema: v9
|
||||||
|
index:
|
||||||
|
prefix: index_
|
||||||
|
period: 168h
|
||||||
|
|
||||||
|
storage_config:
|
||||||
|
boltdb:
|
||||||
|
directory: /tmp/loki/index
|
||||||
|
|
||||||
|
filesystem:
|
||||||
|
directory: /tmp/loki/chunks
|
||||||
|
|
||||||
|
limits_config:
|
||||||
|
enforce_metric_name: false
|
||||||
|
reject_old_samples: true
|
||||||
|
reject_old_samples_max_age: 168h
|
||||||
|
|
||||||
|
chunk_store_config:
|
||||||
|
max_look_back_period: 0
|
||||||
|
|
||||||
|
table_manager:
|
||||||
|
chunk_tables_provisioning:
|
||||||
|
inactive_read_throughput: 0
|
||||||
|
inactive_write_throughput: 0
|
||||||
|
provisioned_read_throughput: 0
|
||||||
|
provisioned_write_throughput: 0
|
||||||
|
index_tables_provisioning:
|
||||||
|
inactive_read_throughput: 0
|
||||||
|
inactive_write_throughput: 0
|
||||||
|
provisioned_read_throughput: 0
|
||||||
|
provisioned_write_throughput: 0
|
||||||
|
retention_deletes_enabled: false
|
||||||
|
retention_period: 0
|
||||||
Reference in New Issue
Block a user