Merge pull request #6923 from k32/sysmon3
feat(system_monitor): Bump version to 3.0.0
This commit is contained in:
commit
342eed9702
|
@ -1024,7 +1024,7 @@ fields("sysmon_top") ->
|
||||||
, {"max_procs",
|
, {"max_procs",
|
||||||
sc(non_neg_integer(),
|
sc(non_neg_integer(),
|
||||||
#{ mapping => "system_monitor.top_max_procs"
|
#{ mapping => "system_monitor.top_max_procs"
|
||||||
, default => 3000000
|
, default => 1_000_000
|
||||||
, desc => "Stop collecting data when the number of processes
|
, desc => "Stop collecting data when the number of processes
|
||||||
in the VM exceeds this value"
|
in the VM exceeds this value"
|
||||||
})
|
})
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
-export([ start/0
|
-export([ start/0
|
||||||
, graceful_shutdown/0
|
, graceful_shutdown/0
|
||||||
, is_ready/0
|
, is_ready/0
|
||||||
|
|
||||||
|
, node_status/0
|
||||||
|
, update_vips/0
|
||||||
]).
|
]).
|
||||||
|
|
||||||
-include_lib("emqx/include/logger.hrl").
|
-include_lib("emqx/include/logger.hrl").
|
||||||
|
@ -57,6 +60,9 @@ print_otp_version_warning() ->
|
||||||
-endif. % OTP_RELEASE > 22
|
-endif. % OTP_RELEASE > 22
|
||||||
|
|
||||||
start_sysmon() ->
|
start_sysmon() ->
|
||||||
|
_ = application:load(system_monitor),
|
||||||
|
application:set_env(system_monitor, node_status_fun, {?MODULE, node_status}),
|
||||||
|
application:set_env(system_monitor, status_checks, [{?MODULE, update_vips, false, 10}]),
|
||||||
case application:get_env(system_monitor, db_hostname) of
|
case application:get_env(system_monitor, db_hostname) of
|
||||||
undefined ->
|
undefined ->
|
||||||
%% If there is no sink for the events, there is no reason
|
%% If there is no sink for the events, there is no reason
|
||||||
|
@ -67,3 +73,11 @@ start_sysmon() ->
|
||||||
_ = application:ensure_all_started(system_monitor, temporary),
|
_ = application:ensure_all_started(system_monitor, temporary),
|
||||||
ok
|
ok
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
node_status() ->
|
||||||
|
emqx_json:encode(#{ backend => mria_rlog:backend()
|
||||||
|
, role => mria_rlog:role()
|
||||||
|
}).
|
||||||
|
|
||||||
|
update_vips() ->
|
||||||
|
system_monitor:add_vip(mria_status:shards_up()).
|
||||||
|
|
2
mix.exs
2
mix.exs
|
@ -64,7 +64,7 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
{:emqtt, github: "emqx/emqtt", tag: "1.4.3", override: true},
|
{:emqtt, github: "emqx/emqtt", tag: "1.4.3", override: true},
|
||||||
{:rulesql, github: "emqx/rulesql", tag: "0.1.4"},
|
{:rulesql, github: "emqx/rulesql", tag: "0.1.4"},
|
||||||
{:observer_cli, "1.7.1"},
|
{:observer_cli, "1.7.1"},
|
||||||
{:system_monitor, github: "k32/system_monitor", tag: "2.2.1"},
|
{:system_monitor, github: "k32/system_monitor", tag: "3.0.0"},
|
||||||
# in conflict by emqtt and hocon
|
# in conflict by emqtt and hocon
|
||||||
{:getopt, "1.0.2", override: true},
|
{:getopt, "1.0.2", override: true},
|
||||||
{:snabbkaffe, github: "kafka4beam/snabbkaffe", tag: "0.16.0", override: true},
|
{:snabbkaffe, github: "kafka4beam/snabbkaffe", tag: "0.16.0", override: true},
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
, {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.4.3"}}}
|
, {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.4.3"}}}
|
||||||
, {rulesql, {git, "https://github.com/emqx/rulesql", {tag, "0.1.4"}}}
|
, {rulesql, {git, "https://github.com/emqx/rulesql", {tag, "0.1.4"}}}
|
||||||
, {observer_cli, "1.7.1"} % NOTE: depends on recon 2.5.x
|
, {observer_cli, "1.7.1"} % NOTE: depends on recon 2.5.x
|
||||||
, {system_monitor, {git, "https://github.com/k32/system_monitor", {tag, "2.2.1"}}}
|
, {system_monitor, {git, "https://github.com/k32/system_monitor", {tag, "3.0.0"}}}
|
||||||
, {getopt, "1.0.2"}
|
, {getopt, "1.0.2"}
|
||||||
, {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "0.16.0"}}}
|
, {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "0.16.0"}}}
|
||||||
, {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.24.0"}}}
|
, {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.24.0"}}}
|
||||||
|
|
Loading…
Reference in New Issue