summaryrefslogtreecommitdiffstats
path: root/src/formats/uwsgi_log.json
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:44:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:44:55 +0000
commit5068d34c08f951a7ea6257d305a1627b09a95817 (patch)
tree08213e2be853396a3b07ce15dbe222644dcd9a89 /src/formats/uwsgi_log.json
parentInitial commit. (diff)
downloadlnav-5068d34c08f951a7ea6257d305a1627b09a95817.tar.xz
lnav-5068d34c08f951a7ea6257d305a1627b09a95817.zip
Adding upstream version 0.11.1.upstream/0.11.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/formats/uwsgi_log.json')
-rw-r--r--src/formats/uwsgi_log.json108
1 files changed, 108 insertions, 0 deletions
diff --git a/src/formats/uwsgi_log.json b/src/formats/uwsgi_log.json
new file mode 100644
index 0000000..cabc436
--- /dev/null
+++ b/src/formats/uwsgi_log.json
@@ -0,0 +1,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)"
+ }
+ ]
+ }
+} \ No newline at end of file