grafana监控体系搭建

# 安装grafana

git clone https://github.com/bytearch/docker-app && cd docker-app/grafana

docker-compose up -d

# 配置Nginx反向代理

server {
    listen 80;
    server_name   grafana.fdfs.site;    
    charset      utf-8;
    index index.html index.js;
    location / {
         proxy_redirect off;
         proxy_set_header Host $host;
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_pass_request_headers on;
         proxy_pass http://172.30.1.57:3000;
         index index.html;
    }    
    error_page   500 502 503 504  /50x.html;
    
    location = /50x.html {
        root 500;
    }   
}

# 测试

默认账号 admin 密码 admin

首次登录后需要修改密码

# 官网模板地址

https://grafana.com/grafana/dashboards/

后续将不断补充监控项,敬请期待!