mirror of
https://github.com/YunoHost-Apps/gotosocial_ynh.git
synced 2024-09-03 19:16:06 +02:00
add settings for Prometheus metrics (#156)
Co-authored-by: yunohost-bot <yunohost@yunohost.org>
This commit is contained in:
parent
c4ea84a648
commit
cb64af8668
13 changed files with 86 additions and 23 deletions
|
@ -27,7 +27,7 @@ Admins are **strongly encouraged to read the documentation** of this package aft
|
|||
Please note that this package uses the ["i'm so tired" software license 1.0](https://github.com/YunoHost-Apps/gotosocial_ynh/blob/master/LICENSE), please read it and accept it before proceeding with installation.
|
||||
|
||||
|
||||
**Shipped version:** 0.16.0~ynh1
|
||||
**Shipped version:** 0.16.0~ynh2
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Admins are **strongly encouraged to read the documentation** of this package aft
|
|||
Please note that this package uses the ["i'm so tired" software license 1.0](https://github.com/YunoHost-Apps/gotosocial_ynh/blob/master/LICENSE), please read it and accept it before proceeding with installation.
|
||||
|
||||
|
||||
**Versión actual:** 0.16.0~ynh1
|
||||
**Versión actual:** 0.16.0~ynh2
|
||||
|
||||
## Capturas
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Admins are **strongly encouraged to read the documentation** of this package aft
|
|||
Please note that this package uses the ["i'm so tired" software license 1.0](https://github.com/YunoHost-Apps/gotosocial_ynh/blob/master/LICENSE), please read it and accept it before proceeding with installation.
|
||||
|
||||
|
||||
**Paketatutako bertsioa:** 0.16.0~ynh1
|
||||
**Paketatutako bertsioa:** 0.16.0~ynh2
|
||||
|
||||
## Pantaila-argazkiak
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Les admins sont **vivement encouragé-e-s à lire la documentation** de ce paque
|
|||
Veuillez noter que ce paquet utilise la ["i'm so tired" software license 1.0](https://github.com/YunoHost-Apps/gotosocial_ynh/blob/master/LICENSE), veuillez la lire et l'accepter avant de procéder à l'installation.
|
||||
|
||||
|
||||
**Version incluse :** 0.16.0~ynh1
|
||||
**Version incluse :** 0.16.0~ynh2
|
||||
|
||||
## Captures d’écran
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Admins are **strongly encouraged to read the documentation** of this package aft
|
|||
Please note that this package uses the ["i'm so tired" software license 1.0](https://github.com/YunoHost-Apps/gotosocial_ynh/blob/master/LICENSE), please read it and accept it before proceeding with installation.
|
||||
|
||||
|
||||
**Versión proporcionada:** 0.16.0~ynh1
|
||||
**Versión proporcionada:** 0.16.0~ynh2
|
||||
|
||||
## Capturas de pantalla
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Admins are **strongly encouraged to read the documentation** of this package aft
|
|||
Please note that this package uses the ["i'm so tired" software license 1.0](https://github.com/YunoHost-Apps/gotosocial_ynh/blob/master/LICENSE), please read it and accept it before proceeding with installation.
|
||||
|
||||
|
||||
**Versi terkirim:** 0.16.0~ynh1
|
||||
**Versi terkirim:** 0.16.0~ynh2
|
||||
|
||||
## Tangkapan Layar
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Admins are **strongly encouraged to read the documentation** of this package aft
|
|||
Please note that this package uses the ["i'm so tired" software license 1.0](https://github.com/YunoHost-Apps/gotosocial_ynh/blob/master/LICENSE), please read it and accept it before proceeding with installation.
|
||||
|
||||
|
||||
**Поставляемая версия:** 0.16.0~ynh1
|
||||
**Поставляемая версия:** 0.16.0~ynh2
|
||||
|
||||
## Снимки экрана
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Admins are **strongly encouraged to read the documentation** of this package aft
|
|||
Please note that this package uses the ["i'm so tired" software license 1.0](https://github.com/YunoHost-Apps/gotosocial_ynh/blob/master/LICENSE), please read it and accept it before proceeding with installation.
|
||||
|
||||
|
||||
**分发版本:** 0.16.0~ynh1
|
||||
**分发版本:** 0.16.0~ynh2
|
||||
|
||||
## 截图
|
||||
|
||||
|
|
|
@ -862,19 +862,19 @@ tracing-insecure-transport: false
|
|||
|
||||
# Bool. Enable OpenTelemetry based metrics support.
|
||||
# Default: false
|
||||
metrics-enabled: false
|
||||
metrics-enabled: __METRICS_ENABLED__
|
||||
|
||||
# Bool. Enable HTTP Basic Authentication for Prometheus metrics endpoint.
|
||||
# Default: false
|
||||
metrics-auth-enabled: false
|
||||
metrics-auth-enabled: __METRICS_AUTH_ENABLED__
|
||||
|
||||
# String. Username for Prometheus metrics endpoint.
|
||||
# Default: ""
|
||||
metrics-auth-username: ""
|
||||
metrics-auth-username: __METRICS_AUTH_USERNAME__
|
||||
|
||||
# String. Password for Prometheus metrics endpoint.
|
||||
# Default: ""
|
||||
metrics-auth-password: ""
|
||||
metrics-auth-password: __METRICS_AUTH_PASSWORD__
|
||||
|
||||
################################
|
||||
##### HTTP CLIENT SETTINGS #####
|
||||
|
|
|
@ -475,6 +475,44 @@ help = "Settings pertaining to... OpenID Connect"
|
|||
help.fr = "Lier les utilisateurs authentifiés par OIDC aux utilisateurs existants sur la base de leur adresse email. Ceci est principalement destiné à des fins de migration si vous utilisiez des versions antérieures de GTS qui ne corrélaient les utilisateurs qu'avec leur adresse email. Dans la plupart des cas, cette valeur doit être fixée à false."
|
||||
type = "select"
|
||||
|
||||
####################
|
||||
#### OBSERVABILITY SETTINGS
|
||||
####################
|
||||
|
||||
[main.observability]
|
||||
|
||||
name = "Metrics settings"
|
||||
|
||||
help = "Settings pertaining to OpenTelemetry based metrics support."
|
||||
|
||||
[main.observability.metrics_enabled]
|
||||
ask.en = "Enable OpenTelemetry based metrics support?"
|
||||
ask.fr = "Activer les métriques basées sur OpenTelemetry ?"
|
||||
bind = "metrics-enabled:__INSTALL_DIR__/config.yaml"
|
||||
choices = [ "true", "false" ]
|
||||
default = "false"
|
||||
type = "select"
|
||||
|
||||
[main.observability.metrics_auth_enabled]
|
||||
ask.en = "Enable HTTP Basic Authentication for Prometheus metrics endpoint?"
|
||||
ask.fr = "Activer l'authentification basique HTTP pour le point de terminaison des métriques Prometheus ?"
|
||||
bind = "metrics-auth-enabled:__INSTALL_DIR__/config.yaml"
|
||||
choices = [ "true", "false" ]
|
||||
default = "false"
|
||||
type = "select"
|
||||
|
||||
[main.observability.metrics_auth_username]
|
||||
ask.en = "Username for Prometheus metrics endpoint."
|
||||
ask.fr = "Identifiant pour le point de terminaison des métriques Prometheus."
|
||||
bind = "metrics-auth-username:__INSTALL_DIR__/config.yaml"
|
||||
type = "string"
|
||||
|
||||
[main.observability.metrics_auth_password]
|
||||
ask.en = "Password for Prometheus metrics endpoint."
|
||||
ask.fr = "Mot de passe pour le point de terminaison des métriques Prometheus."
|
||||
bind = "metrics-auth-password:__INSTALL_DIR__/config.yaml"
|
||||
type = "password"
|
||||
|
||||
####################
|
||||
#### ADVANCED SETTINGS
|
||||
####################
|
||||
|
|
|
@ -9,7 +9,7 @@ description.gl = "Un servidor áxil para a rede social ActivityPub"
|
|||
description.ca = "Un servidor de xarxa social basat en ActivityPub"
|
||||
description.fr = "Serveur de réseau social véloce basé sur ActivityPub"
|
||||
|
||||
version = "0.16.0~ynh1"
|
||||
version = "0.16.0~ynh2"
|
||||
|
||||
maintainers = [ "OniriCorpe" ]
|
||||
|
||||
|
|
|
@ -72,6 +72,11 @@ smtp_password="$mail_pwd"
|
|||
smtp_from="$app@$domain"
|
||||
smtp_disclose_recipients="false"
|
||||
|
||||
metrics_enabled="false"
|
||||
metrics_auth_enabled="false"
|
||||
metrics_auth_username=""
|
||||
metrics_auth_password=""
|
||||
|
||||
advanced_cookies_samesite="lax"
|
||||
advanced_rate_limit_requests="300"
|
||||
|
||||
|
@ -143,6 +148,11 @@ ynh_app_setting_set --app="$app" --key=smtp_password --value="$smtp_password"
|
|||
ynh_app_setting_set --app="$app" --key=smtp_from --value="$smtp_from"
|
||||
ynh_app_setting_set --app="$app" --key=smtp_disclose_recipients --value="$smtp_disclose_recipients"
|
||||
|
||||
ynh_app_setting_set --app="$app" --key=metrics_enabled --value="$metrics_enabled"
|
||||
ynh_app_setting_set --app="$app" --key=metrics_auth_enabled --value="$metrics_auth_enabled"
|
||||
ynh_app_setting_set --app="$app" --key=metrics_auth_username --value="$metrics_auth_username"
|
||||
ynh_app_setting_set --app="$app" --key=metrics_auth_password --value="$metrics_auth_password"
|
||||
|
||||
ynh_app_setting_set --app="$app" --key=advanced_cookies_samesite --value="$advanced_cookies_samesite"
|
||||
ynh_app_setting_set --app="$app" --key=advanced_rate_limit_requests --value="$advanced_rate_limit_requests"
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ if ynh_compare_current_package_version --comparison lt --version 0.7.1~ynh1 || [
|
|||
then
|
||||
# updating parameters
|
||||
advanced_rate_limit_requests="300"
|
||||
# declaration of new parameter
|
||||
# declaration of new parameters
|
||||
instance_expose_suspended_web="false"
|
||||
# registration of parameters
|
||||
ynh_app_setting_set --app="$app" --key=advanced_rate_limit_requests --value="$advanced_rate_limit_requests"
|
||||
|
@ -163,7 +163,7 @@ fi
|
|||
# Upgrade from <0.8.0~ynh2: (also upgrade from packaging v1)
|
||||
if ynh_compare_current_package_version --comparison lt --version 0.8.0~ynh2 || [ -z "${smtp_host:-}" ] || [ -z "${smtp_username:-}" ]
|
||||
then
|
||||
# declaration of new parameter
|
||||
# declaration of new parameters
|
||||
smtp_host="127.0.0.1"
|
||||
smtp_port="25"
|
||||
smtp_username="$app"
|
||||
|
@ -213,16 +213,16 @@ fi
|
|||
# Upgrade from <0.10.0~ynh1:
|
||||
if ynh_compare_current_package_version --comparison lt --version 0.10.0~ynh1 || [ -z "${accounts_custom_css_length:-}" ]
|
||||
then
|
||||
# declaration of new parameter
|
||||
# declaration of new parameters
|
||||
accounts_custom_css_length="10000"
|
||||
# registration of parameter
|
||||
# registration of parameters
|
||||
ynh_app_setting_set --app="$app" --key=accounts_custom_css_length --value="$accounts_custom_css_length"
|
||||
fi
|
||||
|
||||
# Upgrade from <0.11.0~ynh1:
|
||||
if ynh_compare_current_package_version --comparison lt --version 0.11.0~ynh1 || [ -z "$cache_memory_target" ]
|
||||
then
|
||||
# declaration of new parameter
|
||||
# declaration of new parameters
|
||||
cache_memory_target="100MiB"
|
||||
instance_inject_mastodon_version="false"
|
||||
# update default config
|
||||
|
@ -232,7 +232,7 @@ then
|
|||
media_remote_cache_days="7"
|
||||
ynh_app_setting_set --app="$app" --key=media_remote_cache_days --value="$media_remote_cache_days"
|
||||
fi
|
||||
# registration of parameter
|
||||
# registration of parameters
|
||||
ynh_app_setting_set --app="$app" --key=cache_memory_target --value="$cache_memory_target"
|
||||
ynh_app_setting_set --app="$app" --key=instance_inject_mastodon_version --value="$instance_inject_mastodon_version"
|
||||
fi
|
||||
|
@ -240,16 +240,16 @@ fi
|
|||
# Upgrade from <0.12.0~ynh1:
|
||||
if ynh_compare_current_package_version --comparison lt --version 0.12.0~ynh1 || [ -z "${instance_federation_mode:-}" ]
|
||||
then
|
||||
# declaration of new parameter
|
||||
# declaration of new parameters
|
||||
instance_federation_mode="blocklist"
|
||||
# registration of parameter
|
||||
# registration of parameters
|
||||
ynh_app_setting_set --app="$app" --key=instance_federation_mode --value="$instance_federation_mode"
|
||||
fi
|
||||
|
||||
# Upgrade from <0.12.1~ynh2:
|
||||
if ynh_compare_current_package_version --comparison lt --version 0.12.1~ynh2 || [ -z "${oidc_enabled:-}" ]
|
||||
then
|
||||
# declaration of new parameter
|
||||
# declaration of new parameters
|
||||
oidc_enabled="false"
|
||||
oidc_idp_name=""
|
||||
oidc_skip_verification="false"
|
||||
|
@ -257,7 +257,7 @@ then
|
|||
oidc_client_id=""
|
||||
oidc_client_secret=""
|
||||
oidc_link_existing="false"
|
||||
# registration of parameter
|
||||
# registration of parameters
|
||||
ynh_app_setting_set --app="$app" --key=oidc_enabled --value="$oidc_enabled"
|
||||
ynh_app_setting_set --app="$app" --key=oidc_idp_name --value="$oidc_idp_name"
|
||||
ynh_app_setting_set --app="$app" --key=oidc_skip_verification --value="$oidc_skip_verification"
|
||||
|
@ -287,6 +287,21 @@ then
|
|||
ynh_app_setting_delete --app="$app" --key=accounts_approval_required
|
||||
fi
|
||||
|
||||
# Upgrade from <0.16.0~ynh2:
|
||||
if ynh_compare_current_package_version --comparison lt --version 0.16.0~ynh1 || [ -z "${metrics_enabled:-}" ]
|
||||
then
|
||||
# declaration of new parameters
|
||||
metrics_enabled="false"
|
||||
metrics_auth_enabled="false"
|
||||
metrics_auth_username=""
|
||||
metrics_auth_password=""
|
||||
# registration of parameters
|
||||
ynh_app_setting_set --app="$app" --key=metrics_enabled --value="$metrics_enabled"
|
||||
ynh_app_setting_set --app="$app" --key=metrics_auth_enabled --value="$metrics_auth_enabled"
|
||||
ynh_app_setting_set --app="$app" --key=metrics_auth_username --value="$metrics_auth_username"
|
||||
ynh_app_setting_set --app="$app" --key=metrics_auth_password --value="$metrics_auth_password"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue