refactor(config): change sysmon.os.cpu_check_interval to ms
This commit is contained in:
parent
7837069a93
commit
41820e3bbd
|
@ -128,5 +128,5 @@ start_check_timer() ->
|
||||||
Interval = emqx_config:get([sysmon, os, cpu_check_interval]),
|
Interval = emqx_config:get([sysmon, os, cpu_check_interval]),
|
||||||
case erlang:system_info(system_architecture) of
|
case erlang:system_info(system_architecture) of
|
||||||
"x86_64-pc-linux-musl" -> ok;
|
"x86_64-pc-linux-musl" -> ok;
|
||||||
_ -> emqx_misc:start_timer(timer:seconds(Interval), check)
|
_ -> emqx_misc:start_timer(Interval, check)
|
||||||
end.
|
end.
|
||||||
|
|
|
@ -507,7 +507,7 @@ fields("sysmon_vm") ->
|
||||||
];
|
];
|
||||||
|
|
||||||
fields("sysmon_os") ->
|
fields("sysmon_os") ->
|
||||||
[ {"cpu_check_interval", t(duration_s(), undefined, 60)}
|
[ {"cpu_check_interval", t(duration(), undefined, 60)}
|
||||||
, {"cpu_high_watermark", t(percent(), undefined, "80%")}
|
, {"cpu_high_watermark", t(percent(), undefined, "80%")}
|
||||||
, {"cpu_low_watermark", t(percent(), undefined, "60%")}
|
, {"cpu_low_watermark", t(percent(), undefined, "60%")}
|
||||||
, {"mem_check_interval", maybe_disabled(duration_s(), 60)}
|
, {"mem_check_interval", maybe_disabled(duration_s(), 60)}
|
||||||
|
|
|
@ -25,7 +25,7 @@ all() -> emqx_ct:all(?MODULE).
|
||||||
|
|
||||||
init_per_suite(Config) ->
|
init_per_suite(Config) ->
|
||||||
emqx_config:put([sysmon, os], #{
|
emqx_config:put([sysmon, os], #{
|
||||||
cpu_check_interval => 60,cpu_high_watermark => 0.8,
|
cpu_check_interval => 60000,cpu_high_watermark => 0.8,
|
||||||
cpu_low_watermark => 0.6,mem_check_interval => 60,
|
cpu_low_watermark => 0.6,mem_check_interval => 60,
|
||||||
procmem_high_watermark => 0.05,sysmem_high_watermark => 0.7}),
|
procmem_high_watermark => 0.05,sysmem_high_watermark => 0.7}),
|
||||||
application:ensure_all_started(os_mon),
|
application:ensure_all_started(os_mon),
|
||||||
|
|
Loading…
Reference in New Issue