Skip to content

Commit

Permalink
Template metrics config
Browse files Browse the repository at this point in the history
  • Loading branch information
chrzaszcz committed Feb 14, 2024
1 parent 42225c1 commit 1b717f2
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions rel/fed1.vars-toml.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
{http_graphql_api_user_endpoint_port, 5566}.
{http_api_endpoint_port, 5294}.
{http_api_client_endpoint_port, 8095}.
{http_prometheus_endpoint_port, 9095}.

%% This node is for s2s testing.
%% "localhost" host should NOT be defined.
Expand Down
10 changes: 10 additions & 0 deletions rel/files/mongooseim.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@
host = "_"
path = "/api/graphql"
schema_endpoint = "user"
{{#http_prometheus_endpoint}}

[[listen.http]]
{{{http_prometheus_endpoint}}}
transport.num_acceptors = 10

[[listen.http.handlers.mongoose_prometheus_handler]]
host = "_"
path = "/metrics"
{{/http_prometheus_endpoint}}

[[listen.c2s]]
port = {{{c2s_port}}}
Expand Down
1 change: 1 addition & 0 deletions rel/mim1.vars-toml.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
{http_graphql_api_user_endpoint_port, 5561}.
{http_api_endpoint_port, 8088}.
{http_api_client_endpoint_port, 8089}.
{http_prometheus_endpoint_port, 9091}.

{hosts, "\"localhost\", \"anonymous.localhost\", \"localhost.bis\""}.
{host_types, "\"test type\", \"dummy auth\", \"anonymous\""}.
Expand Down
1 change: 1 addition & 0 deletions rel/mim2.vars-toml.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{http_graphql_api_admin_endpoint_port, 5552}.
{http_graphql_api_domain_admin_endpoint_port, 5542}.
{http_graphql_api_user_endpoint_port, 5562}.
{http_prometheus_endpoint_port, 9092}.

{hosts, "\"localhost\", \"anonymous.localhost\", \"localhost.bis\""}.
{host_types, "\"test type\", \"dummy auth\""}.
Expand Down
1 change: 1 addition & 0 deletions rel/mim3.vars-toml.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{http_graphql_api_user_endpoint_port, 5563}.
{http_api_endpoint_port, 8092}.
{http_api_client_endpoint_port, 8193}.
{http_prometheus_endpoint_port, 9093}.

"./vars-toml.config".

Expand Down
1 change: 1 addition & 0 deletions rel/prod.vars-toml.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
{http_graphql_api_user_endpoint_port, 5561}.
{http_api_endpoint_port, 8088}.
{http_api_client_endpoint_port, 8089}.
{http_prometheus_endpoint_port, 9091}.

{hosts, "\"localhost\""}.
{default_server_domain, "\"localhost\""}.
Expand Down
1 change: 1 addition & 0 deletions rel/reg1.vars-toml.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
{http_graphql_api_user_endpoint_port, 5564}.
{http_api_endpoint_port, 8074}.
{http_api_client_endpoint_port, 8075}.
{http_prometheus_endpoint_port, 9094}.

%% This node is for global distribution testing.
%% reg is short for region.
Expand Down
7 changes: 6 additions & 1 deletion rel/vars-toml.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@
{http_api_endpoint, "ip_address = \"127.0.0.1\"
port = {{http_api_endpoint_port}}"}.
{http_api_client_endpoint, "port = {{ http_api_client_endpoint_port }}"}.
{http_prometheus_endpoint, "port = {{ http_prometheus_endpoint_port }}"}.
{s2s_use_starttls, "\"optional\""}.
{s2s_certfile, "\"priv/ssl/fake_server.pem\""}.
{internal_databases, "[internal_databases.mnesia]"}.
{metrics_section, "[metrics.exometer]"}.

%% This is temporary, and most likely we will only enable Prometheus by default
{metrics_section, "[metrics.exometer]

[metrics.prometheus]"}.

"./configure.vars.config".

Expand Down

0 comments on commit 1b717f2

Please sign in to comment.