Skip to content

Commit 127392e

Browse files
committed
fixes for 8.2.0, part 2
1 parent 758567a commit 127392e

File tree

2 files changed

+41
-5
lines changed

2 files changed

+41
-5
lines changed

files/pixiu

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ PIXIU_TOMCAT \s*%{IPORHOST:syslog_hostname} %{SYSLOGPROG} \[%{HTTPDATE:timestamp
88

99
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

11-
PIXIU_ALARM_USER_TYPE (?:UNIX )?user name, owner name %{USERNAME:username}
11+
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

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,14 @@ data = [
180180
},
181181
},
182182
{
183-
"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).",
184184
"expected": {
185185
"@source_host": "C4STO01-Node1",
186186
"program": "alarm",
187-
"alarm_severity": "Major",
187+
"alarm_severity": "Warning",
188188
"alarm_object": "OceanStor-Distributed-Storage",
189189
"alarm_id": "0xFEA6A000F",
190-
"used_space": 6638000000,
190+
"used_space": 8191000000,
191191
"quota_used_type": "space",
192192
"quota_type": "user",
193193
"username": "vsc10042",
@@ -200,6 +200,27 @@ data = [
200200
"path": "/100",
201201
},
202202
},
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+
},
203224
{
204225
"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).",
205226
"expected": {
@@ -386,4 +407,15 @@ data = [
386407
"response": 200,
387408
},
388409
},
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+
},
389421
]

0 commit comments

Comments
 (0)