Lightweight log collection system Loki build: Loki + Promtail + Grafana


Loki is the log engine part, and Promtail is the log collection terminal, which is then displayed through Grafana

Download and install Grafana

Run through docker: Docker Hub: grafana/grafana

  • Pull mirror

    sudo docker pull grafana/grafana:8.2.6-ubuntu
  • Run the container

    docker run -d --name=grafana -p 3000:3000 grafana/grafana:8.2.6-ubuntu
  • Check the running status of the container

    sudo docker ps -a

    The result is as follows

    CONTAINER ID   IMAGE                          COMMAND                  CREATED          STATUS                       PORTS                                       NAMES
    7c14b9185bba   grafana/grafana:8.2.6-ubuntu   "/"                10 seconds ago   Up 9 seconds       >3000/tcp, :::3000->3000/tcp   grafana
    e54c22e5e007   kibana:7.14.1                  "/bin/tini -- /usr/l…"   2 months ago     Exited (137) 6 weeks ago                                                 kibana
    8e026d320ccb   elasticsearch:7.14.1           "/bin/tini -- /usr/l…"   2 months ago     Exited (143) 8 minutes ago                                               elasticsearch
    3a8303062241   af86b73e120c                   "python /opt/.pychar…"   3 months ago     Exited (137) 3 months ago                                                zealous_murdock
    8058b9b301a7   5a03a6f61ecb                   "/bin/sh"                3 months ago     Created                                                                  pycharm_helpers_PY-212.4746.96
    db793a4a46ff   af86b73e120c                   "bash"                   3 months ago     Exited (0) 3 months ago                                                  py_container

Open the browser, enter the IP + port to access grafana

The network address of my Macbook is, and the network address of the server grafana


Q: The first reaction after seeing this interface is what is the default account password?
A: The default user name and password are admin . After logging in for the first time using the default account password, we will be asked to set up a new password



Reference article:

Loki, I decided to replace ELK!

阅读 1.3k


Python 后端工程师可加:企鹅群:537131912

1.1k 声望
29 粉丝
0 条评论

Python 后端工程师可加:企鹅群:537131912

1.1k 声望
29 粉丝