summaryrefslogtreecommitdiffstats
path: root/src/formats/uwsgi_log.json
blob: cabc43608efa6343a231c02fbc39575b5676c963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{
    "$schema": "https://lnav.org/schemas/format-v1.schema.json",
    "uwsgi_log": {
        "title": "Uwsgi Log",
        "description": "The uwsgi log format.",
        "multiline": false,
        "regex": {
            "std": {
                "pattern": "^\\[pid: (?<s_pid>\\d+)\\|app: (?<s_app>[\\-\\d]+)\\|req: (?<s_req>[\\-\\d]+)/(?<s_worker_reqs>\\d+)\\] (?<c_ip>[^ ]+) \\((?<cs_username>[^\\)]*)\\) \\{(?<cs_vars>\\d+) vars in (?<cs_bytes>\\d+) bytes\\} \\[(?<timestamp>[^\\]]+)\\] (?<cs_method>[A-Z]+) (?<cs_uri_stem>[^ \\?]+)(?:\\?(?<cs_uri_query>[^ ]*))? => generated (?<sc_bytes>\\d+) bytes in (?<s_runtime>\\d+) (?<rt_unit>\\w+) \\((?<cs_version>[^ ]+) (?<sc_status>\\d+)\\) (?<sc_headers>\\d+) headers in (?<sc_header_bytes>\\d+) bytes \\((?<s_switches>\\d+) switches on core (?<s_core>\\d+)\\)(?<body>.*)"
            }
        },
        "level-field": "sc_status",
        "level": {
            "error": "^[^123]"
        },
        "opid-field": "s_pid",
        "value": {
            "s_pid": {
                "kind": "string",
                "identifier": true
            },
            "s_app": {
                "kind": "string",
                "identifier": true
            },
            "s_req": {
                "kind": "integer",
                "foreign-key": true
            },
            "s_worker_reqs": {
                "kind": "integer",
                "foreign-key": true
            },
            "c_ip": {
                "kind": "string",
                "collate": "ipaddress",
                "identifier": true
            },
            "cs_username": {
                "kind": "string",
                "identifier": true
            },
            "cs_vars": {
                "kind": "integer"
            },
            "cs_bytes": {
                "kind": "integer"
            },
            "cs_method": {
                "kind": "string",
                "identifier": true
            },
            "cs_uri_stem": {
                "kind": "string",
                "identifier": true
            },
            "cs_uri_query": {
                "kind": "string"
            },
            "sc_bytes": {
                "kind": "integer"
            },
            "s_runtime": {
                "kind": "float",
                "description": "hello, world",
                "unit": {
                    "field": "rt_unit",
                    "scaling-factor": {
                        "msecs": {
                            "op": "divide",
                            "value": 1000.0
                        },
                        "micros": {
                            "op": "divide",
                            "value": 1000000.0
                        }
                    }
                }
            },
            "cs_version": {
                "kind": "string",
                "identifier": true
            },
            "sc_status": {
                "kind": "integer",
                "foreign-key": true
            },
            "sc_headers": {
                "kind": "integer"
            },
            "sc_header_bytes": {
                "kind": "integer"
            },
            "s_switches": {
                "kind": "integer"
            },
            "s_core": {
                "kind": "string",
                "identifier": true
            }
        },
        "sample": [
            {
                "line": "[pid: 24386|app: 0|req: 482950/4125645] 86.221.170.65 () {44 vars in 1322 bytes} [Tue Jan  3 05:01:31 2012] GET /contest/log_presence/shhootter/?_=1325592089910 => generated 192 bytes in 21 msecs (HTTP/1.1 200) 4 headers in 188 bytes (1 switches on core 0)"
            }
        ]
    }
}