diff options
| author | feld <feld@feld.me> | 2020-10-27 17:47:56 +0000 |
|---|---|---|
| committer | feld <feld@feld.me> | 2020-10-27 17:47:56 +0000 |
| commit | 5aff4799515c141cb0a42686733b2f40faba6f86 (patch) | |
| tree | 2c43ad7595e7f798a8215db691f70fa7efe3a19f /config | |
| parent | 2f7401806bbe5427bbcaa7cdce35130320ae3bb4 (diff) | |
| parent | 50d428088017e0383d8b35d4ab1b831f40646ab0 (diff) | |
| download | pleroma-5aff4799515c141cb0a42686733b2f40faba6f86.tar.gz pleroma-5aff4799515c141cb0a42686733b2f40faba6f86.zip | |
Merge branch '1668-prometheus-access-restrictions' into 'develop'
[#1668] App metrics endpoint (Prometheus) access restrictions
Closes #1668
See merge request pleroma/pleroma!3093
Diffstat (limited to 'config')
| -rw-r--r-- | config/config.exs | 7 | ||||
| -rw-r--r-- | config/description.exs | 37 |
2 files changed, 43 insertions, 1 deletions
diff --git a/config/config.exs b/config/config.exs index 124f30a77..bd611fd42 100644 --- a/config/config.exs +++ b/config/config.exs @@ -635,7 +635,12 @@ config :pleroma, Pleroma.Emails.UserEmail, config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: false -config :prometheus, Pleroma.Web.Endpoint.MetricsExporter, path: "/api/pleroma/app_metrics" +config :prometheus, Pleroma.Web.Endpoint.MetricsExporter, + enabled: false, + auth: false, + ip_whitelist: [], + path: "/api/pleroma/app_metrics", + format: :text config :pleroma, Pleroma.ScheduledActivity, daily_user_limit: 25, diff --git a/config/description.exs b/config/description.exs index 0da1da57d..55363c45a 100644 --- a/config/description.exs +++ b/config/description.exs @@ -3716,5 +3716,42 @@ config :pleroma, :config_description, [ suggestions: [2] } ] + }, + %{ + group: :prometheus, + key: Pleroma.Web.Endpoint.MetricsExporter, + type: :group, + description: "Prometheus app metrics endpoint configuration", + children: [ + %{ + key: :enabled, + type: :boolean, + description: "[Pleroma extension] Enables app metrics endpoint." + }, + %{ + key: :ip_whitelist, + type: [{:list, :string}, {:list, :charlist}, {:list, :tuple}], + description: + "[Pleroma extension] If non-empty, restricts access to app metrics endpoint to specified IP addresses." + }, + %{ + key: :auth, + type: [:boolean, :tuple], + description: "Enables HTTP Basic Auth for app metrics endpoint.", + suggestion: [false, {:basic, "myusername", "mypassword"}] + }, + %{ + key: :path, + type: :string, + description: "App metrics endpoint URI path.", + suggestions: ["/api/pleroma/app_metrics"] + }, + %{ + key: :format, + type: :atom, + description: "App metrics endpoint output format.", + suggestions: [:text, :protobuf] + } + ] } ] |
