chore(alarm): support license alarm type

This commit is contained in:
zhongwencool 2022-01-13 17:41:16 +08:00
parent 720c730baf
commit c6a571c207
1 changed files with 2 additions and 0 deletions

View File

@ -375,6 +375,8 @@ normalize_message(high_cpu_usage, #{usage := Usage}) ->
list_to_binary(io_lib:format("~p% cpu usage", [Usage]));
normalize_message(too_many_processes, #{usage := Usage}) ->
list_to_binary(io_lib:format("~p% process usage", [Usage]));
normalize_message(license_usage, #{high_watermark := High}) ->
iolist_to_binary(["License: the number of connections exceeds ", High, "%"]);
normalize_message(partition, #{occurred := Node}) ->
list_to_binary(io_lib:format("Partition occurs at node ~s", [Node]));
normalize_message(<<"resource", _/binary>>, #{type := Type, id := ID}) ->