feat(olp): alarm without nodeid
This commit is contained in:
parent
547484a2d1
commit
bfe4346469
|
@ -400,7 +400,7 @@ normalize(#deactivated_alarm{activate_at = ActivateAt,
|
||||||
|
|
||||||
normalize_message(Name, no_details) ->
|
normalize_message(Name, no_details) ->
|
||||||
list_to_binary(io_lib:format("~p", [Name]));
|
list_to_binary(io_lib:format("~p", [Name]));
|
||||||
normalize_message({runq_overload, _Node}, #{node := Node, runq_length := Len}) ->
|
normalize_message(runq_overload, #{node := Node, runq_length := Len}) ->
|
||||||
list_to_binary(io_lib:format("Runq is overloaded on node: ~p: ~p", [Node, Len]));
|
list_to_binary(io_lib:format("Runq is overloaded on node: ~p: ~p", [Node, Len]));
|
||||||
normalize_message(high_system_memory_usage, #{high_watermark := HighWatermark}) ->
|
normalize_message(high_system_memory_usage, #{high_watermark := HighWatermark}) ->
|
||||||
list_to_binary(io_lib:format("System memory usage is higher than ~p%", [HighWatermark]));
|
list_to_binary(io_lib:format("System memory usage is higher than ~p%", [HighWatermark]));
|
||||||
|
|
|
@ -76,11 +76,11 @@ handle_event({clear_alarm, process_memory_high_watermark}, State) ->
|
||||||
{ok, State};
|
{ok, State};
|
||||||
|
|
||||||
handle_event({set_alarm, {?LC_ALARM_ID_RUNQ, Info}}, State) ->
|
handle_event({set_alarm, {?LC_ALARM_ID_RUNQ, Info}}, State) ->
|
||||||
emqx_alarm:activate({runq_overload, node()}, Info),
|
emqx_alarm:activate(runq_overload, Info),
|
||||||
{ok, State};
|
{ok, State};
|
||||||
|
|
||||||
handle_event({clear_alarm, ?LC_ALARM_ID_RUNQ}, State) ->
|
handle_event({clear_alarm, ?LC_ALARM_ID_RUNQ}, State) ->
|
||||||
emqx_alarm:deactivate({runq_overload, node()}),
|
emqx_alarm:deactivate(runq_overload),
|
||||||
{ok, State};
|
{ok, State};
|
||||||
|
|
||||||
handle_event(_, State) ->
|
handle_event(_, State) ->
|
||||||
|
|
Loading…
Reference in New Issue