github.com/easysoft/zendata@v0.0.0-20240513203326-705bd5a7fd67/yaml/log/apache.access.v1.yaml (about)

     1  title: Apache Logs
     2  desc: Apache访问日志 # 127.0.0.1 - - [10/Jan/2021:14:02:05 +0800] "GET /index.php HTTP/1.1" 200 1404 "-" "<AGENT>"
     3  version: 1.0
     4  
     5  field: logs
     6  instances:
     7    - instance: log
     8      note: log
     9      fields:
    10      - field: host
    11        from: ip.v2.yaml
    12        use: ipC{10},ipB{10},ipA{10}
    13        postfix: " - - "
    14  
    15      - field: date time
    16        range: "(-1W):60"        # 支持当前时间的运算,Y、M、D、W、h、m、s分别对应年、月、日、周、时、分、秒。
    17        type: timestamp          #   月份和星期几的长、短格式,可分别用January、Jan和Monday、Mon来表达,如YY/Jan​/DD。
    18        format: "DD/Jan/YYYY:hh:mm:ss"
    19        prefix: "["
    20        postfix: " +0800] "
    21  
    22      - field: request uri
    23        range: uri.txt:R
    24        prefix: '"GET /'
    25        postfix: ' HTTP/1.1" '
    26  
    27      - field: response code
    28        range: 200{50},404,500
    29        postfix: " "
    30        rand: true
    31  
    32      - field: request size
    33        range: 100-9900:R
    34        postfix: " "
    35        rand: true
    36  
    37      - field: tag
    38        range: '[]{8},["-"]' # 空或-
    39        postfix: " "
    40        rand: true
    41  
    42      - field: agent
    43        range: agent.txt:R
    44        prefix: '"'
    45        postfix: '"'