数据治理中心 DATAARTS STUDIO-正则表达式分隔半结构化文本:Apache server日志

时间:2024-11-12 17:24:52

Apache server日志

  • 日志样例:
    [Mon Jan 08 20:43:51.854334 2018] [mpm_event:notice] [pid 36465:tid 140557517657856] AH00489: Apache/2.4.12 (Unix) OpenSSL/1.0.1t configured -- resuming normal operations
  • 正则表达式为:
    ^\[(.*)\] \[(.*)\] \[(.*)\] (.*).*
  • 解析结果如下:
    表5 Apache server日志解析结果

    列号

    样值

    1

    Mon Jan 08 20:43:51.854334 2018

    2

    mpm_event:notice

    3

    pid 36465:tid 140557517657856

    4

    AH00489: Apache/2.4.12 (Unix) OpenSSL/1.0.1t configured -- resuming normal operations

support.huaweicloud.com/bestpractice-dataartsstudio/dataartsstudio_05_0014.html