1. 能够正常访问loki日志的环境

    docker-config.yaml配置
    如172.31.239.138,使用离线部署包单机部署,密码123456 中/opt/docker/monitor/promtail/etc/dockerconfig.yaml

    访问链接
    http://172.31.239.138:3000/grafana/explore?orgId=1&left=%5B%22now-2d%22,%22now%22,%22Loki%22,%7B%22expr%22:%22%7Bfilename%3D%5C%22%2Fopt%2Flogs%2Fphoenix-amr-web%2Fphoenix-amr-web%2Fcluster.log%5C%22%7D%22%7D,%7B%22ui%22:%5Btrue,true,true,%22none%22%5D%7D%5D
    image.png

    image.png

    image.png

    loki local-config.yaml
    /opt/docker/monitor/loki/etc/local-config.yaml

    image.png

    1. 无法正常访问日志的docker-config.yaml配置

    如172.31.239.139,单机部署,密码123456,环境中/opt/docker/monitor/promtail/etc/dockerconfig.yaml
    访问链接
    http://172.31.239.139:3000/grafana/explore?orgId=1&left=%5B%22now-1h%22,%22now%22,%22Loki%22,%7B%7D,%7B%22ui%22:%5Btrue,true,true,%22none%22%5D%7D%5D
    image.png

    image.png

    image.png

    loki loki-config.yml
    /opt/docker/monitor/loki/etc/loki-config.yml

    image.png

    promtail 容器 docker logs
    image.png

    loki容器 docker logs
    image.png