diff options
| author | Michael Klishin <michael@clojurewerkz.org> | 2017-02-23 19:55:27 +0300 |
|---|---|---|
| committer | Michael Klishin <michael@clojurewerkz.org> | 2017-02-23 19:55:27 +0300 |
| commit | afc851a40c80862a90e95a1b54196173f3629feb (patch) | |
| tree | ea21fa0f6c3c5d85b5a08da75323521006709e18 /src | |
| parent | ff83a7471c40746e59473153a3a0c5bfdc7350ba (diff) | |
| parent | b261c8bf823dbada19e91efcbefd742e47e2a7cf (diff) | |
| download | rabbitmq-server-git-afc851a40c80862a90e95a1b54196173f3629feb.tar.gz | |
Merge branch 'stable'
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_alarm.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rabbit_alarm.erl b/src/rabbit_alarm.erl index daf2c167fa..9466dd0eeb 100644 --- a/src/rabbit_alarm.erl +++ b/src/rabbit_alarm.erl @@ -128,8 +128,12 @@ handle_call(_Request, State) -> handle_event({set_alarm, {{resource_limit, Source, Node}, []}}, State) -> case is_node_alarmed(Source, Node, State) of - true -> {ok, State}; - false -> handle_set_resource_alarm(Source, Node, State) + true -> + {ok, State}; + false -> + rabbit_event:notify(alarm_set, [{source, Source}, + {node, Node}]), + handle_set_resource_alarm(Source, Node, State) end; handle_event({set_alarm, Alarm}, State = #alarms{alarms = Alarms}) -> case lists:member(Alarm, Alarms) of @@ -141,6 +145,8 @@ handle_event({set_alarm, Alarm}, State = #alarms{alarms = Alarms}) -> handle_event({clear_alarm, {resource_limit, Source, Node}}, State) -> case is_node_alarmed(Source, Node, State) of true -> + rabbit_event:notify(alarm_cleared, [{source, Source}, + {node, Node}]), handle_clear_resource_alarm(Source, Node, State); false -> {ok, State} |
