Skip to content

Commit fff8328

Browse files
authored
Merge pull request #33 from wpoely86/fix
fix quota pattern for pixiu
2 parents 672c4d8 + f6de218 commit fff8328

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

files/pixiu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PIXIU_NGINX \s*%{IPORHOST:syslog_hostname} %{SYSLOGPROG} %{IPORHOST:clientip} (?
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

9-
PIXIU_ALARM_PREFIX \s*%{IPORHOST:syslog_hostname} %{SYSLOGPROG}: .+ (?<alarm_object>OceanStor-Distributed-Storage)\s+%{NUMBER} (?<alarm_id>0x[A-F0-9]+) (?<alarm_severity>%{WORD})\(%{NUMBER:alarm_severity_level}\):
9+
PIXIU_ALARM_PREFIX \s*%{IPORHOST:syslog_hostname} %{SYSLOGPROG}: .+ (?<alarm_object>(OceanStor-Distributed-Storage|Cluster-Nexus))\s+%{NUMBER} (?<alarm_id>0x[A-F0-9]+) (?<alarm_severity>%{WORD})\(%{NUMBER:alarm_severity_level}\):
1010

1111
PIXIU_ALARM_USER_TYPE user name, owner name %{USERNAME:username}
1212

tests/data/pixiu

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,4 +435,22 @@ data = [
435435
"path": "/",
436436
},
437437
},
438+
{
439+
"raw": "<187>Oct 1 08:17:01 NEX-STOR-PIX-1A alarm[3966612]: <186>2025-10-01 08:16:59 DST Cluster-Nexus 5965446 0xFEA6A000E Major(1): The used space (943824MB) of quota (type directory quota) of dtree (name --, ID 0) at / in namespace (name diab -preklin, ID 1025) reaches to the space soft quota of (943718MB).",
440+
"expected": {
441+
"program": "alarm",
442+
"quota_used_type": "directory",
443+
"alarm_object": "Cluster-Nexus",
444+
"namespace": "diab -preklin",
445+
"namespace_id": 1025,
446+
"dtree": "--",
447+
"dtree_id": 0,
448+
"used_space": 989671194624,
449+
"quota_used_type": "space",
450+
"quota_type": "directory",
451+
"quota_limit_type": "soft",
452+
"quota_space_limit": 989560045568,
453+
"path": "/",
454+
},
455+
},
438456
]

0 commit comments

Comments
 (0)