From f68de5307afb4bce20aebaeb21be07b9f1979934 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 4 May 2022 08:33:32 -0500 Subject: [PATCH] Enable metrics --- config.exs | 7 +++++++ fly.toml | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/config.exs b/config.exs index 372b392..e7f472d 100644 --- a/config.exs +++ b/config.exs @@ -44,6 +44,13 @@ config :esshd, port: 2222, password_authenticator: "Pleroma.BBS.Authenticator" +config :prometheus, Pleroma.Web.Endpoint.MetricsExporter, + enabled: true, + auth: false, + ip_whitelist: ["127.0.0.1", "::1"], + path: "/api/pleroma/app_metrics", + format: :text + # We can't store the secrets in this file, since this is baked into the docker image if not File.exists?("/data/pleroma/secret.exs") do secret = :crypto.strong_rand_bytes(64) |> Base.encode64() |> binary_part(0, 64) diff --git a/fly.toml b/fly.toml index 78634f9..debaf21 100644 --- a/fly.toml +++ b/fly.toml @@ -6,6 +6,10 @@ processes = [] destination = "/data" source = "soapbox_data" +[metrics] + port = 80 + path = "/api/pleroma/app_metrics" + [[services]] internal_port = 8080 processes = ["app"] -- 2.45.2