Add observer, prometheus and grafana
This commit is contained in:
3
src/config/vm.args
Normal file
3
src/config/vm.args
Normal file
@@ -0,0 +1,3 @@
|
||||
-sname ${NODE_NAME}
|
||||
-setcookie ${RELEASE_COOKIE}
|
||||
-kernel inet_dist_use_interface {0,0,0,0}
|
||||
@@ -14,6 +14,9 @@ start(_StartType, _StartArgs) ->
|
||||
ok = infra_mnesia:wait_for_tables(),
|
||||
start_http(),
|
||||
start_admin_http(),
|
||||
% Запускаем сборщик метрик Prometheus
|
||||
application:ensure_all_started(prometheus),
|
||||
application:ensure_all_started(prometheus_cowboy),
|
||||
{ok, Pid};
|
||||
Error ->
|
||||
Error
|
||||
@@ -27,6 +30,7 @@ start_http() ->
|
||||
|
||||
Dispatch = cowboy_router:compile([
|
||||
{'_', [
|
||||
{"/metrics/[:registry]", prometheus_cowboy2_handler, []},
|
||||
{"/health", handler_health, []},
|
||||
{"/v1/register", handler_register, []},
|
||||
{"/v1/login", handler_login, []},
|
||||
|
||||
Reference in New Issue
Block a user