Skip to content

Commit fc26c91

Browse files
committed
add quota account alerts for Pixiu
1 parent 9df4d9f commit fc26c91

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

files/pixiu

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ PIXIU_USER_SPACE_ALARM %{PIXIU_ALARM_PREFIX} %{PIXIU_ALARM_COMMON} reaches (?:or
2323
PIXIU_LOGIN_STATUS failed|succeeded
2424
PIXIU_LOGIN_ACTION in|out
2525

26+
PIXIU_ACCOUNT_QUOTA %{PIXIU_ALARM_PREFIX} The used \((?<quota_used_type>%{WORD})\) quota \(%{NUMBER:quota_used}\) of account \(ID (?<account_id>%{NUMBER:int})\) reaches or approaches \(%{NUMBER:quota_limit}\) of the \(%{WORD} %{WORD} quota\)\..*
2627

2728
PIXIU_LOGIN_ALARM %{PIXIU_ALARM_PREFIX} User \(user name %{USERNAME:username}\) %{PIXIU_LOGIN_STATUS:state} (?:to log %{PIXIU_LOGIN_ACTION:action}|in logging %{PIXIU_LOGIN_ACTION:action})(?: upon timeout)? from source \(%{IPORHOST:source_ip}\)\..*
2829

2930
PIXIU_ALARM_GENERAL %{PIXIU_ALARM_PREFIX} %{GREEDYDATA:alarm_message}
3031

31-
PIXIU_ALARM %{PIXIU_USER_INODE_ALARM}|%{PIXIU_USER_SPACE_ALARM}|%{PIXIU_LOGIN_ALARM}|%{PIXIU_ALARM_GENERAL}
32+
# PIXIU_ALARM_GENERAL must be last
33+
PIXIU_ALARM %{PIXIU_USER_INODE_ALARM}|%{PIXIU_USER_SPACE_ALARM}|%{PIXIU_LOGIN_ALARM}|%{PIXIU_ACCOUNT_QUOTA}|%{PIXIU_ALARM_GENERAL}

tests/data/pixiu

+4
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ data = [
338338
"program": "alarm",
339339
"alarm_severity": "Major",
340340
"alarm_object": "OceanStor-Distributed-Storage",
341+
"account_id": 319307833,
342+
"quota_used_type": "space",
343+
"quota_used": 549755813888000,
344+
"quota_limit": 549755813888000,
341345
},
342346
},
343347
]

tests/logstash_7.6.2.conf

+3
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,13 @@ filter {
7676
"actread" => "integer"
7777
"dtree_id" => "integer"
7878
"namespace_id" => "integer"
79+
"account_id" => "integer"
7980
"used_files" => "integer"
8081
"used_space" => "integer"
8182
"quota_files_limit" => "integer"
8283
"quota_space_limit" => "integer"
84+
"quota_used" => "integer"
85+
"quota_limit" => "integer"
8386
}
8487
}
8588
}

0 commit comments

Comments
 (0)