回答
收藏
分享
举报
NGINX 的error日志可视化监控
提问于2020-10-21 11:16

浏览 1k

文章标签

大家的nginx的ERROR日志有做可视化监控嘛?有做的话有没有可以分享的文档参考一下>_<。

我记得之前陶老师公开课的时候好像讲过,又还给陶老师了,呜呜。(我也同步找一下)

已修改于2023-03-06 20:34



写下您的回答
发表回答
全部回答(3)

按点赞数排序

按时间排序

公开课里介绍了3个简易的轻量级工具:

1、命令行工具ngxtop, https://github.com/lebinh/ngxtop

2、web页面goaccess, https://goaccess.io/get-started

3、web页面visitors,http://www.hping.org/visitors/

如果你有特别灵活的定制需求,或者集群规模巨大,或者已经搭建好了ELK,那还是推荐用ELK


赞同

1

回复举报

回答于2020-10-30 10:23



回复陶辉
回复

可以用ELK啊,也可以用其他的日志类的软件。

赞同

1

回复举报

回答于2020-10-26 14:41



回复守望
回复

ELK可以分析ERROR日志嘛?

赞同

0

回复举报

回答于2020-10-21 14:55



回复baru
回复
提问者
baru
这家伙很懒还未留下介绍~
0
文章
3
问答
0
粉丝
相关问答

支持,需要在stream子系统里开启ssl_preread on

点赞 0
浏览 831

根据你提供的配置和错误信息,有几个问题可能导致你无法访问多级目录的资源。下面是可能的解决方案:


1. 尝试一:访问/applet/img/user/fitness_logo2.png 提示404的配置:

```

location / {

    root /app/docker/statics/web;

    try_files $uri $uri/ /index.html;

    index index.html index.htm;

}

location /applet {

  root /app/docker/statics;

  index index.html;

}

```

这个配置中,`location /applet` 指定了根目录为 `/app/docker/statics`,而你的资源实际路径是 `/app/docker/statics/applet`。因此,你需要在 `location /applet` 的配置中添加 `/applet` 部分,以便正确地指向资源路径。修改后的配置如下:

```

location / {

    root /app/docker/statics/web;

    try_files $uri $uri/ /index.html;

    index index.html index.htm;

}

location /applet {

  root /app/docker/statics;

  index index.html;

  try_files $uri $uri/ /applet$uri /applet$uri/ =404;

}

```


2. 尝试二:访问/applet/img/user/fitness_logo2.png 提示404的配置:

```

location / {

    root /app/docker/statics/web;

    try_files $uri $uri/ /index.html;

    index index.html index.htm;

}

location /applet {

  alias /app/docker/statics/applet;

}

```

在这个配置中,你使用了 `alias` 指令来映射 `/applet` 到 `/app/docker/statics/applet` 目录。但是,由于你的请求是 `/applet/img/user/fitness_logo2.png`,Nginx 尝试将请求 `/applet/img/user/fitness_logo2.png/` 解析为目录,并在该目录下寻找索引文件,导致出现错误。为了解决这个问题,你可以尝试在 `location /applet` 的配置中使用 `try_files` 指令来显式指定文件的匹配。修改后的配置如下:

```

location / {

    root /app/docker/statics/web;

    try_files $uri $uri/ /index.html;

    index index.html index.htm;

}

location /applet {

  alias /app/docker/statics/applet;

  try_files $uri $uri/ =404;

}

```

点赞 0
浏览 2.6k