image: grafana/grafana:latest container_name: grafana_promtail_loki_demo_grafana restart: unless-stopped ports: - "3000:3000" volumes: - "./grafana_promtail_loki/grafana/data:/var/lib/grafana" # - "./grafana_promtail_loki/grafana/config:/etc/grafana" - "./grafana_promtail_loki/grafana/l...
namespace: default labels: app: promtail spec: selector: matchLabels: app: promtail type: daemonset author: danny template: metadata: labels: app: promtail type: daemonset author: danny spec: containers: - name: promtail image: grafana/promtail:latest args: - -config.file=/etc/promtail/p...
driver: json-fileoptions: max-size:"200m"max-file:"4"command: ["-config.file=/opt/promtail-config.yaml"] #web界面。有的就不需要再部署了,都一样grafana: image: grafana/grafana:9.5.18restart:"always"ports:-3000:3000container_name:"grafana"volumes:-"./grafana/grafana.ini:/etc/grafana/graf...
version: "3" networks: loki: services: loki: image: grafana/loki:2.9.0 ports: - "3100:3100" command: -config.file=/etc/loki/local-config.yaml networks: - loki promtail: image: grafana/promtail:2.9.0 volumes: - /var/log:/var/log command: -config.file=/etc/promtail/config.yml ...
1. docker 安装 Loki 和 promtail docker-compose.yml 文件 version:"3"services:loki:image:grafana/loki container_name:loki restart:always ports:-"3100:3100"volumes:-$PWD:/etc/loki command:-config.file=/etc/loki/loki-local-config.yaml
从Promtail 接收到的日志和应用的 metrics 指标就具有相同的标签集 不仅提供了更好的日志和指标之间的上下文切换,还避免了对日志进行全文索引 Grafana 一个用于监控和可视化观测的开源平台 支持非常丰富的数据源 在Loki 技术栈中它专门用来展示来自 Prometheus 和 Loki 等数据源的时间序列数据 ...
yaml networks: - loki promtail: image: grafana/promtail:2.9.0 volumes: - /var/lib/docker/containers:/var/lib/docker/containers:ro - /var/run/docker.sock:/var/run/docker.sock - /data/softs/grafana_promtail_loki/promtail:/etc/promtail command: -config.file=/etc/promtail/promtail-docker...
1.5 安装kilo和grafana docker-compose up -d docker-compose logs #查看日志 docker-compose ps #查看进程 二、安装promtail 需要收集日志的服务器没安装docker,就直接下载安装包,在命令行启动 wget https://github.com/grafana/loki/releases/download/v2.9.2/promtail-linux-amd64.zip #当前最新版,和loki版本...
promtail: image: grafana/promtail:latest container_name: promtail restart: unless-stopped volumes: - ./promtail/logs:/var/logs - ./config:/etc/promtail/config - ./nginx/logs:/logs command: -config.file=/etc/promtail/config/promtail-config.yaml networks: - loki grafana: image: grafana/...
Run Promtail via Docker image with following docker run command: -p 9080:9080 \ -v /opt/promtail/promtail.yaml:/promtail.yaml \ -v /opt/promtail/pos/:/tmp/ \ -v /var/log/haproxy.log:/haproxy.log \ grafana/promtail:latest -config.file /promtail.yaml ...