diff --git a/.github/workflows/testpatterns.yml b/.github/workflows/testpatterns.yml index e705fbb..88d2d61 100644 --- a/.github/workflows/testpatterns.yml +++ b/.github/workflows/testpatterns.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest steps: - name: add logstash repo - uses: myci-actions/add-deb-repo@master + uses: myci-actions/add-deb-repo@11 with: repo: deb https://artifacts.elastic.co/packages/8.x/apt stable main repo-name: elastic-8.x diff --git a/files/pixiu b/files/pixiu index dbb3bb8..9345add 100644 --- a/files/pixiu +++ b/files/pixiu @@ -16,9 +16,9 @@ PIXIU_QUOTA_SIZE_TYPE (?:(?%{NUMBER:int})|(?%{PIXIU_BYTE PIXIU_ALARM_COMMON The used (?%{WORD}) \(%{PIXIU_QUOTA_SIZE_TYPE}\) of (?:the )?quota \(type (?:UNIX )?(?%{WORD}) quota(?:, %{PIXIU_ALARM_USER_TYPE})?\) of (%{PIXIU_ALARM_COMMON_OLD}|%{PIXIU_ALARM_COMMON_NEW}) -PIXIU_ALARM_COMMON_OLD dtree \(name (?%{NOTSPACE}), ID (?%{NUMBER:int})\) at %{UNIXPATH:path} in namespace \(name (?%{NOTSPACE}), ID (?%{NUMBER:int})\) +PIXIU_ALARM_COMMON_OLD dtree \(name (?%{NOTSPACE}), ID (?%{NUMBER:int})\) at %{UNIXPATH:path} in namespace \(name (?%{DATA}), ID (?%{NUMBER:int})\) -PIXIU_ALARM_COMMON_NEW namespace \(name (?%{NOTSPACE}), ID (?%{NUMBER:int})\), dtree \(name (?%{NOTSPACE}),\s?ID (?%{NUMBER:int})\), or path %{UNIXPATH:path}\)? +PIXIU_ALARM_COMMON_NEW namespace \(name (?%{DATA}), ID (?%{NUMBER:int})\), dtree \(name (?%{NOTSPACE}),\s?ID (?%{NUMBER:int})\), or path %{UNIXPATH:path}\)? PIXIU_USER_INODE_ALARM %{PIXIU_ALARM_PREFIX} %{PIXIU_ALARM_COMMON} reaches (?:or approaches )?(?:to )?the (:?(?%{WORD}) (?:file|space) quantity quota of|(?:file|space) quantity (?%{WORD}) quota of) \((?%{NUMBER:int})\).* diff --git a/tests/data/pixiu b/tests/data/pixiu index 964b347..8704d4b 100644 --- a/tests/data/pixiu +++ b/tests/data/pixiu @@ -418,4 +418,21 @@ data = [ "response": 200, }, }, + { + "raw": "<187>Oct 24 13:47:36 HKSTO03-Node1 alarm[79311]: <186>2024-10-24 13:47:35 DST OceanStor-Distributed-Storage 1678359 0xFEA6A000B Major(1): The used space (10KB) of quota (type directory quota) of dtree (name --, ID 0) at / in namespace (name my -new -bucket, ID 592) reaches or approaches to the space hard quota of (10KB). Data will fail to be written.", + "expected": { + "program": "alarm", + "quota_used_type": "directory", + "namespace": "my -new -bucket", + "namespace_id": 592, + "dtree": "--", + "dtree_id": 0, + "used_space": 10000, + "quota_used_type": "space", + "quota_type": "directory", + "quota_limit_type": "hard", + "quota_space_limit": 10000, + "path": "/", + }, + }, ]