Skip to content

Commit d6e44a5

Browse files
committed
fix nginx patterns for pixiu
1 parent fc26c91 commit d6e44a5

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

files/pixiu

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PIXIU_BASH \s*%{IPORHOST:syslog_hostname} \[%{PROG:program}\]: \[%{YEAR}-%{MONTH
22

33
PIXIU_APACHE \[%{HTTPDATE:timestamp}\] %{IPORHOST:clientip} %{HTTPDUSER:auth} %{WORD:verb} %{NOTSPACE:request} %{GREEDYDATA:other}
44

5-
PIXIU_NGINX \s*%{IPORHOST:syslog_hostname} %{SYSLOGPROG} %{IPORHOST:clientip} - %{HTTPDUSER:auth}\s+\[%{HTTPDATE:timestamp}\] \"%{WORD:verb} %{NOTSPACE:request} HTTP/%{NUMBER:httpversion}\" %{NUMBER:response:int} %{GREEDYDATA:other}
5+
PIXIU_NGINX \s*%{IPORHOST:syslog_hostname} %{SYSLOGPROG} %{IPORHOST:clientip} (?:- %{HTTPDUSER:auth}\s+)?\[%{HTTPDATE:timestamp}\] \"%{WORD:verb} %{NOTSPACE:request} HTTP/%{NUMBER:httpversion}\" %{NUMBER:response:int} %{GREEDYDATA:other}
66

77
PIXIU_TOMCAT \s*%{IPORHOST:syslog_hostname} %{SYSLOGPROG} \[%{HTTPDATE:timestamp}\]\^%{IPORHOST:clientip}\^%{HTTPDUSER:auth}\^%{WORD:verb} %{NOTSPACE:request} HTTP/%{NUMBER:httpversion}\^%{GREEDYDATA:other}
88

tests/data/pixiu

+13
Original file line numberDiff line numberDiff line change
@@ -344,4 +344,17 @@ data = [
344344
"quota_limit": 549755813888000,
345345
},
346346
},
347+
{
348+
# "raw": '<174>Oct 17 12:50:42 HKSTO03-Node1 nginx 127.0.0.1 - - [17/Oct/2022:12:50:42 +0200] "GET /dsware/service/cluster/storagepool/query*** HTTP/1.1" 200 "0.062" 924 "-" "Apache-HttpClient/5.1 (Java/1.8.0_322)" "-" 127.0.0.1:9527 200 "0.064" "********" "********" "********" "127.0.0.1" "application/json;charset=UTF-8" "-" "-" "gzip, x-gzip, deflate"',
349+
350+
"raw": '<174>Aug 14 09:15:16 C4STO01-Node1 nginx 127.0.0.1 [14/Aug/2024:09:15:16 +0200] "GET /api/v2/cluster/se*** HTTP/1.1" 200 "0.046" 3072 "Apache-HttpClient/5.1 (Java/1.8.0_372)" "-" 127.0.0.1:8099 200 "0.046" "********" "********" "********" "127.0.0.1" "application/json;charset=UTF-8" "-" ',
351+
"expected": {
352+
"@source_host": "C4STO01-Node1",
353+
"program": "nginx",
354+
"clientip": "127.0.0.1",
355+
"verb": "GET",
356+
"request": "/api/v2/cluster/se***",
357+
"response": 200,
358+
},
359+
},
347360
]

0 commit comments

Comments
 (0)