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   "/run.sh"                10 seconds ago   Up 9 seconds                 0.0.0.0:3000->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 192.168.31.100, and the network address of the server grafana

图片.png

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

图片.png

图片.png

Reference article:

Loki, I decided to replace ELK!


universe_king
3.4k 声望678 粉丝