From e23a21e66ad60ab41a65028536985b8ab6ae9b46 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 12 Aug 2024 13:49:06 +0200 Subject: [PATCH 1/2] add another test --- tests/data/pixiu | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/data/pixiu b/tests/data/pixiu index 81cf367..cee4150 100644 --- a/tests/data/pixiu +++ b/tests/data/pixiu @@ -266,4 +266,24 @@ data = [ "path": "/108", }, }, + { + "raw": "<187>Aug 10 00:32:43 C4STO01-Node1 alarm[4162768]: <186>2024-08-10 00:32:43 DST 172.19.104.10 OceanStor-Distributed-Storage 1465743 0xFEA6A000C Major(1): The used space (6108MB) of the quota (type user quota, user name, owner name vsc11010) of dtree (name 110, ID 4107) at /110 in namespace (name user, ID 70) reaches the soft space quota of (5851MB) 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", + "username": "vsc11010", + "quota_type": "user", + "quota_used_type": "space", + "dtree": "110", + "dtree_id": 4107, + "namespace": "user", + "namespace_id": 70, + "quota_limit_type": "soft", + "path": "/110", + "quota_space_limit": 5851000000, + "used_space": 6108000000, + }, + }, ] From 818898422195b7421fc64f88df8426002963f967 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 12 Aug 2024 14:18:24 +0200 Subject: [PATCH 2/2] more tests --- tests/data/pixiu | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/data/pixiu b/tests/data/pixiu index cee4150..bbd99c3 100644 --- a/tests/data/pixiu +++ b/tests/data/pixiu @@ -236,6 +236,23 @@ data = [ "path": "/", }, }, + { + "raw": "<187>Jun 5 10:19:28 HKSTO03-Node1 alarm[2003199]: <186>2024-06-05 10:19:26 DST 172.19.96.130 OceanStor-Distributed-Storage 908704 0xFEA6A000E Major(1): The used space (8388608MB) of quota (type directory quota) of dtree (name --, ID 0) at / in namespace (name nasbackupfacs, ID 182) reaches or approaches to the space hard quota of (8388608MB). Data will fail to be written.", + "expected": { + "program": "alarm", + "quota_used_type": "directory", + "namespace": "nasbackupfacs", + "namespace_id": 182, + "dtree": "--", + "dtree_id": 0, + "used_space": 8388608000000, + "quota_used_type": "space", + "quota_type": "directory", + "quota_limit_type": "hard", + "quota_space_limit": 8388608000000, + "path": "/", + }, + }, { "raw": "<190>Jun 5 11:19:57 C4STO01-Node1 alarm[4162768]: <189>2024-06-05 11:19:57 DST 172.19.104.10 OceanStor-Distributed-Storage 1140981 0x100F00C90022 Informational(9): User (user name adm_CV000080) succeeded in logging out upon timeout from source (172.18.252.67).", "expected": {