其他分享
首页 > 其他分享> > 官方文档采用Docker方式安装

官方文档采用Docker方式安装

作者:互联网

官方文档地址:https://github.com/grafana/loki/tree/master/production

The Docker images for Loki and Promtail are available on DockerHub.

To test locally, we recommend using the docker-compose.yaml file in this directory. Docker starts containers for Promtail, Loki, and Grafana.

  1. Either git clone this repository locally and cd loki/production, or download a copy of the docker-compose.yaml locally.

  2. Ensure you have the most up-to-date Docker container images:

    docker-compose pull
    
  3. Run the stack on your local Docker:

    docker-compose up
    
  4. Grafana should now be available at http://localhost:3000/. Log in with admin / admin and follow the steps for configuring the datasource in Grafana, using http://loki:3100 for the URL field.

Note: When running locally, Promtail starts before Loki is ready. This can lead to the error message "Data source connected, but no labels received." After a couple seconds, Promtail will forward all newly created log messages correctly. Until this is fixed we recommend building and running from source.

For instructions on how to query Loki, see our usage docs.

To deploy a cluster of loki locally, please refer to this doc

标签:compose,Promtail,locally,Loki,官方,文档,Docker,loki
来源: https://www.cnblogs.com/sanduzxcvbnm/p/14230617.html