SIGEV13
V2EX  ›  编程

HTTP Access Log 监视器

  •  
  •   SIGEV13 · Dec 18, 2019 · 5604 views
    This topic created in 2364 days ago, the information mentioned may be changed or developed.

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

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

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

    4 replies    2019-12-19 18:43:05 +08:00
    dandycheung
        1
    dandycheung  
       Dec 18, 2019 via iPhone
    不错。不过一会儿就有人要求中文了。
    SIGEV13
        2
    SIGEV13  
    OP
       Dec 19, 2019
    @dandycheung 如果有时间俺再加上吧 ^^", 估计得写一小时。
    wzw
        3
    wzw  
       Dec 19, 2019 via iPhone
    Nginx 的格式要不要调整?
    SIGEV13
        4
    SIGEV13  
    OP
       Dec 19, 2019
    @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 就好啦 :)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3756 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 57ms · UTC 10:32 · PVG 18:32 · LAX 03:32 · JFK 06:32
    ♥ Do have faith in what you're doing.