Skip to content

Commit

Permalink
fix patterns for pixiu again
Browse files Browse the repository at this point in the history
  • Loading branch information
wpoely86 committed Jun 18, 2024
1 parent 0930fe1 commit 2557683
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/pixiu
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ PIXIU_QUOTA_SIZE_TYPE (?:(?<used_files>%{NUMBER:int})|(?<used_space>%{PIXIU_BYTE

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})\)

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})\)\..*
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})\).*

PIXIU_USER_SPACE_ALARM %{PIXIU_ALARM_PREFIX} %{PIXIU_ALARM_COMMON} reaches (?:or approaches )?to the (:?(?<quota_limit_type>%{WORD}) space(?: quantity)? quota of|space(?: quantity)? (?<quota_limit_type>%{WORD}) quota of) \((?<quota_space_limit>%{PIXIU_BYTES})\)\..*
PIXIU_USER_SPACE_ALARM %{PIXIU_ALARM_PREFIX} %{PIXIU_ALARM_COMMON} reaches (?:or approaches )?(?:to )?the (:?(?<quota_limit_type>%{WORD}) space(?: quantity)? quota of|space(?: quantity)? (?<quota_limit_type>%{WORD}) quota of) \((?<quota_space_limit>%{PIXIU_BYTES})\).*

PIXIU_LOGIN_STATUS failed|succeeded
PIXIU_LOGIN_ACTION in|out
Expand Down
20 changes: 20 additions & 0 deletions tests/data/pixiu
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,24 @@ data = [
"action": "out",
},
},
{
"raw": "<187>Jun 17 14:08:15 C4STO01-Node1 alarm[4162768]: <186>2024-06-17 14:08:13 DST 172.19.104.10 OceanStor-Distributed-Storage 1214022 0xFEA6A000C Major(1): The used files (19340) of the quota (type user quota, user name, owner name vsc10831) of dtree (name 108, ID 8200) at /108 in namespace (name user, ID 70) reaches the soft file quantity quota of (19047) and the grace period ended (7) days ago. The user or user group will fail to write data.",
"expected": {
"program": "alarm",
"alarm_severity": "Major",
"alarm_object": "OceanStor-Distributed-Storage",
"alarm_id": "0xFEA6A000C",
"used_files": 19340,
"username": "vsc10831",
"quota_type": "user",
"quota_used_type": "files",
"dtree": "108",
"dtree_id": 8200,
"namespace": "user",
"namespace_id": 70,
"quota_limit_type": "soft",
"quota_files_limit": 19047,
"path": "/108",
},
},
]

0 comments on commit 2557683

Please sign in to comment.