V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
SIGEV13
V2EX  ›  编程

HTTP Access Log 监视器

  •  
  •   SIGEV13 · 2019-12-18 19:15:38 +08:00 · 4868 次点击
    这是一个创建于 1562 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近面试个公司要求做个 HTTP Access Log 监视器, 虽然最后 on site 环节没有面上,不过俺把作业分享出来希望能对大家有用。

    代码 https://github.com/raptorsun/http_log_monitor

    还写了个短文介绍一下 https://raptorsun.github.io/howtopymonitor.html

    4 条回复    2019-12-19 18:43:05 +08:00
    dandycheung
        1
    dandycheung  
       2019-12-18 19:25:42 +08:00 via iPhone
    不错。不过一会儿就有人要求中文了。
    SIGEV13
        2
    SIGEV13  
    OP
       2019-12-19 01:14:49 +08:00
    @dandycheung 如果有时间俺再加上吧 ^^", 估计得写一小时。
    wzw
        3
    wzw  
       2019-12-19 10:02:10 +08:00 via iPhone
    Nginx 的格式要不要调整?
    SIGEV13
        4
    SIGEV13  
    OP
       2019-12-19 18:43:05 +08:00
    @wzw Nginx 的默认格式也符合 W3 标准:remotehost rfc931 authuser [date] "request" status bytes

    Nginx: https://docs.nginx.com/nginx/admin-guide/monitoring/logging/#access_log
    W3: https://www.w3.org/Daemon/User/Config/Logging.html#common-logfile-format

    如果换格式, 调整一下 Parser 就好啦 :)
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3264 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 14:17 · PVG 22:17 · LAX 07:17 · JFK 10:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.