diff --git a/docker-compose.yml b/docker-compose.yml index c927b627..82182959 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -89,6 +89,7 @@ services: image: grafana/grafana container_name: grafana restart: always + user: "472" ports: - "3009:3000" environment: @@ -106,26 +107,6 @@ services: - "9104:9104" volumes: - /home/ec2-user/my.cnf:/etc/mysql/my.cnf - -# loki: -# image: grafana/loki:latest -# container_name: loki -# restart: always -# ports: -# - "3100:3100" -# volumes: -# - ./loki-config.yml:/etc/loki/local-config.yaml -# -# promtail: -# image: grafana/promtail:latest -# container_name: promtail -# restart: always -# volumes: -# - /var/log:/var/log -# - ./promtail-config.yml:/etc/promtail/config.yml -# command: -config.file=/etc/promtail/config.yml -# environment: -# - HOSTNAME=promtail volumes: grafana-storage: prometheus-data: diff --git a/loki-config.yml b/loki-config.yml deleted file mode 100644 index 04ce72c5..00000000 --- a/loki-config.yml +++ /dev/null @@ -1,53 +0,0 @@ -auth_enabled: false - -server: - http_listen_port: 3100 - log_level: info - -common: - path_prefix: /loki - storage: - filesystem: - chunks_directory: /loki/chunks - rules_directory: /loki/rules - replication_factor: 1 - -schema_config: - configs: - - from: 2022-01-01 - store: boltdb-shipper - object_store: filesystem - schema: v11 - index: - prefix: index_ - period: 24h - -storage_config: - boltdb_shipper: - active_index_directory: /loki/index - shared_store: filesystem - cache_location: /loki/cache - -limits_config: - enforce_metric_name: false - reject_old_samples: true - reject_old_samples_max_age: 168h - -chunk_store_config: - max_look_back_period: 0s - -table_manager: - retention_deletes_enabled: true - retention_period: 168h - -ingester: - lifecycler: - ring: - kvstore: - store: inmemory - replication_factor: 1 - final_sleep: 0s - chunk_idle_period: 15m - chunk_block_size: 262144 - chunk_retain_period: 1m - max_transfer_retries: 0 diff --git a/promtail-config.yml b/promtail-config.yml deleted file mode 100644 index 90420faa..00000000 --- a/promtail-config.yml +++ /dev/null @@ -1,27 +0,0 @@ -server: - http_listen_port: 9080 - -positions: - filename: /tmp/positions.yaml - -clients: - - url: http://loki:3100/loki/api/v1/push - -scrape_configs: - - job_name: system - static_configs: - - targets: - - localhost - labels: - job: varlogs - host: ${HOSTNAME} - __path__: /var/log/*log - - - job_name: applications - static_configs: - - targets: - - localhost - labels: - job: applogs - host: ${HOSTNAME} - __path__: /path/to/your/application/logs/*.log