我的服务器上预装了 3 个日志分析器工具。在您看来,您认为 3 种分析工具中的哪一种最好?
我的目标:基本上是分析错误日志文件
安装的软件:
* Analog
* Awstats
* Webalizer
Run Code Online (Sandbox Code Playgroud)
我确实通读了这个问题 --> Apache 日志分析器
谢谢你。
我想以自定义格式 (GELF) 将我的 Apache 日志发送到 UDP 接收服务器(运行 Graylog2)。我确信一切正常,但过了一会儿,我收到警报,我的服务器没有响应。我在 Apache 错误日志中看到了一大堆:
piped log program 'nc -w 1 -u logserver 12201' failed unexpectedly
Run Code Online (Sandbox Code Playgroud)
有趣的是,在流量非常小的服务器上,即使网站没有流量,我也会在日志中不断看到此错误。当有流量时,日志确实会由 netcat 发送到 graylog - 所以无论如何它都可以工作。
如果我停止 Apache 并重新启动它,则重新启动后错误会继续显示在错误日志中。在停止它之后,我确保没有剩余的失控进程。
配置是:
LogFormat "{ \"version\": \"1.1\", \"host\": \"%V\", \"short_message\": \"%r\", \"full_message\": \"%r, status: %>s, %O bytes, User Agent: %{User-Agent}i\", \"timestamp\": %{%s}t, \"level\": 6, \"_user_agent\": \"%{User-Agent}i\", \"_source_ip\": \"%a\", \"_duration_usec\": %D, \"_duration_sec\": %T, \"_request_size_byte\": %O, \"_http_status\": %s, \"_http_request_path\": \"%U\", \"_http_request\": \"%U%q\", \"_http_method\": \"%m\", \"_http_referer\": \"%{Referer}i\" }" graylog2_access
Run Code Online (Sandbox Code Playgroud)
和自定义日志:
CustomLog "|nc -w 1 -u …
Run Code Online (Sandbox Code Playgroud)