Skip to content

Commit d559e89

Browse files
authored
Merge pull request #26 from wpoely86/fixes
Fixes for new firmware 8.2.0 of Pixiu (AB#23392)
2 parents 9bae649 + 127392e commit d559e89

File tree

2 files changed

+73
-8
lines changed

2 files changed

+73
-8
lines changed

files/pixiu

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@ 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}: .+%{IPORHOST} (?<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)\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

1313
PIXIU_BYTES [0-9]+(?:K|M|G|T|P)?B
1414

1515
PIXIU_QUOTA_SIZE_TYPE (?:(?<used_files>%{NUMBER:int})|(?<used_space>%{PIXIU_BYTES}))
1616

17-
PIXIU_ALARM_COMMON The used (?<quota_used_type>%{WORD}) \(%{PIXIU_QUOTA_SIZE_TYPE}\) of (?:the )?quota \(type (?<quota_type>%{WORD}) quota(?:, %{PIXIU_ALARM_USER_TYPE})?\) of dtree \(name (?<dtree>%{NOTSPACE}), ID (?<dtree_id>%{NUMBER:int})\) at %{UNIXPATH:path} in namespace \(name (?<namespace>%{NOTSPACE}), ID (?<namespace_id>%{NUMBER:int})\)
17+
PIXIU_ALARM_COMMON The used (?<quota_used_type>%{WORD}) \(%{PIXIU_QUOTA_SIZE_TYPE}\) of (?:the )?quota \(type (?:UNIX )?(?<quota_type>%{WORD}) quota(?:, %{PIXIU_ALARM_USER_TYPE})?\) of (%{PIXIU_ALARM_COMMON_OLD}|%{PIXIU_ALARM_COMMON_NEW})
18+
19+
PIXIU_ALARM_COMMON_OLD dtree \(name (?<dtree>%{NOTSPACE}), ID (?<dtree_id>%{NUMBER:int})\) at %{UNIXPATH:path} in namespace \(name (?<namespace>%{NOTSPACE}), ID (?<namespace_id>%{NUMBER:int})\)
20+
21+
PIXIU_ALARM_COMMON_NEW namespace \(name (?<namespace>%{NOTSPACE}), ID (?<namespace_id>%{NUMBER:int})\), dtree \(name (?<dtree>%{NOTSPACE}),\s?ID (?<dtree_id>%{NUMBER:int})\), or path %{UNIXPATH:path}\)?
1822

1923
PIXIU_USER_INODE_ALARM %{PIXIU_ALARM_PREFIX} %{PIXIU_ALARM_COMMON} reaches (?:or approaches )?(?:to )?the (:?(?<quota_limit_type>%{WORD}) (?:file|space) quantity quota of|(?:file|space) quantity (?<quota_limit_type>%{WORD}) quota of) \((?<quota_files_limit>%{NUMBER:int})\).*
2024

tests/data/pixiu

+67-6
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,27 @@ data = [
100100
},
101101
},
102102
{
103-
"raw": "<187>Aug 20 20:18:25 C4STO01-Node1 alarm[2613490]: <186>2023-08-20 20:18:25 DST 172.19.104.10 OceanStor-Distributed-Storage 259068 0xFEA6A000E Major(1): The used files (1501) of quota (type directory quota) of dtree (name test1, ID 4101) at / in namespace (name admin, ID 71) reaches to the file quantity soft quota of (1000).",
103+
"raw": "<188>Oct 20 20:51:03 C4STO01-Node1 alarm[53019]: <188>2024-10-20 20:51:01 DST OceanStor-Distributed-Storage 2171540 0xFEA6A000B Warning(1): The used files (3000) of quota (type directory quota) of dtree (name test, ID 4101) at /test in namespace (name backups, ID 98) reaches or approaches to the file quantity hard quota of (3000). Data will fail to be written.",
104+
"expected": {
105+
"@source_host": "C4STO01-Node1",
106+
"program": "alarm",
107+
"alarm_severity": "Warning",
108+
"alarm_object": "OceanStor-Distributed-Storage",
109+
"alarm_id": "0xFEA6A000B",
110+
"used_files": 3000,
111+
"quota_type": "directory",
112+
"quota_used_type": "files",
113+
"dtree": "test",
114+
"dtree_id": 4101,
115+
"namespace": "backups",
116+
"namespace_id": 98,
117+
"quota_limit_type": "hard",
118+
"quota_files_limit": 3000,
119+
"path": "/test",
120+
},
121+
},
122+
{
123+
"raw": "<187>Aug 20 20:18:25 C4STO01-Node1 alarm[26190]: <186>2023-08-20 20:18:25 DST 172.19.104.10 OceanStor-Distributed-Storage 259068 0xFEA6A000E Major(1): The used files (1501) of quota (type directory quota) of dtree (name test1, ID 4101) at / in namespace (name admin, ID 71) reaches to the file quantity soft quota of (1000).",
104124
"expected": {
105125
"@source_host": "C4STO01-Node1",
106126
"program": "alarm",
@@ -160,14 +180,14 @@ data = [
160180
},
161181
},
162182
{
163-
"raw": "<187>Aug 20 19:40:26 C4STO01-Node1 alarm[2613490]: <186>2023-08-20 19:32:24 DST 2023-08-20 19:40:26 DST 172.19.104.10 OceanStor-Distributed-Storage 259045 0xFEA6A000F Major(2): The used space (6638MB) of quota (type user quota, user name, owner name vsc10042) of dtree (name 100, ID 8193) at /100 in namespace (name user, ID 70) reaches to the space soft quota of (6144MB).",
183+
"raw": "<188>Oct 20 20:35:17 C4STO01-Node1 alarm[53019]: <188>2024-10-20 20:35:17 DST OceanStor-Distributed-Storage 2171251 0xFEA6A000F Warning(1): The used space (8191MB) of the quota (type UNIX user quota, user name, owner name vsc10042) of namespace (name user, ID 70), dtree (name 100, ID 8193), or path /100 reaches the space soft quota of (6144MB).",
164184
"expected": {
165185
"@source_host": "C4STO01-Node1",
166186
"program": "alarm",
167-
"alarm_severity": "Major",
187+
"alarm_severity": "Warning",
168188
"alarm_object": "OceanStor-Distributed-Storage",
169189
"alarm_id": "0xFEA6A000F",
170-
"used_space": 6638000000,
190+
"used_space": 8191000000,
171191
"quota_used_type": "space",
172192
"quota_type": "user",
173193
"username": "vsc10042",
@@ -180,6 +200,27 @@ data = [
180200
"path": "/100",
181201
},
182202
},
203+
{
204+
"raw": "<188>Oct 20 20:32:56 C4STO01-Node1 alarm[53019]: <188>2024-10-20 20:32:56 DST OceanStor-Distributed-Storage 2171198 0xFEA6A0011 Warning(1): The used space (8192MB) of the quota (type UNIX user quota, user name, owner name vsc10042) of namespace (name user, ID 70), dtree (name 100,ID 8193), or path /100) reaches or approaches to the hard space quota of (8192MB). The user or user group will fail to write data.",
205+
"expected": {
206+
"@source_host": "C4STO01-Node1",
207+
"program": "alarm",
208+
"alarm_severity": "Warning",
209+
"alarm_object": "OceanStor-Distributed-Storage",
210+
"alarm_id": "0xFEA6A0011",
211+
"used_space": 8192000000,
212+
"quota_used_type": "space",
213+
"quota_type": "user",
214+
"username": "vsc10042",
215+
"dtree": "100",
216+
"dtree_id": 8193,
217+
"namespace": "user",
218+
"namespace_id": 70,
219+
"quota_limit_type": "hard",
220+
"quota_space_limit": 8192000000,
221+
"path": "/100",
222+
},
223+
},
183224
{
184225
"raw": "<190>Feb 27 12:04:21 HKSTO03-Node1 alarm[1266782]: <189>2024-02-27 12:04:21 172.19.96.130 OceanStor-Distributed-Storage 543842 0x200F002A0015 Informational(8): User (user name adm_wpoelmans) succeeded in logging in from source (172.18.124.113).",
185226
"expected": {
@@ -345,8 +386,6 @@ data = [
345386
},
346387
},
347388
{
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-
350389
"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" "-" ',
351390
"expected": {
352391
"@source_host": "C4STO01-Node1",
@@ -357,4 +396,26 @@ data = [
357396
"response": 200,
358397
},
359398
},
399+
{
400+
"raw": '<174>Aug 14 16:00:24 C4STO01-Node1 nginx 134.184.143.132 [14/Aug/2024:16:00:05 +0200] "GET /api/v2/converged_service/nam*** HTTP/1.1" 200 "0.165" 48 "vsc-rest-client" "-" 127.0.0.1:8778 200 "0.166" "********" "None" "None" "" "-" "-" ',
401+
"expected": {
402+
"@source_host": "C4STO01-Node1",
403+
"program": "nginx",
404+
"clientip": "134.184.143.132",
405+
"verb": "GET",
406+
"request": "/api/v2/converged_service/nam***",
407+
"response": 200,
408+
},
409+
},
410+
{
411+
"raw": "<174>Sep 11 11:43:47 C4STO01-Node1 nginx 172.18.124.214 [11/Sep/2024:11:43:42 +0200] \"GET /gui/api/v2/common/ala*** HTTP/1.1\" 200 \"0.132\" 59 \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:122.0) Gecko/20100101 Firefox/122.0\" \"-\" 127.0.0.1:8088 200 \"0.117\" \"None\" \"********\" \"********\" \"\" \"application/json; charset=UTF-8\" \"application/json, text/plain, */*\" ",
412+
"expected": {
413+
"@source_host": "C4STO01-Node1",
414+
"program": "nginx",
415+
"clientip": "172.18.124.214",
416+
"verb": "GET",
417+
"request": "/gui/api/v2/common/ala***",
418+
"response": 200,
419+
},
420+
},
360421
]

0 commit comments

Comments
 (0)