diff --git a/conf/nginx.conf b/conf/nginx.conf index 3af9f44..a25d1a1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,7 +6,7 @@ location __PATH__ { rewrite ^ https://$server_name$request_uri? permanent; } - proxy_pass http://127.0.0.1:__PORT____PATH__; + proxy_pass http://127.0.0.1:__PORT__; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/conf/systemd.service b/conf/systemd.service index f2ba69c..d7eda5c 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,7 +9,8 @@ Group=__APP__ WorkingDirectory=__FINALPATH__/ ExecStart=__FINALPATH__/prometheus \ --config.file=__FINALPATH__/prometheus.yml --web.enable-admin-api \ - --web.external-url=__PATH__ \ + --web.external-url=__PATH__/ \ + --web.route-prefix=__PATH__/ \ --web.listen-address=localhost:__PORT__ StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit diff --git a/scripts/install b/scripts/install index 94ad0e8..2815c83 100755 --- a/scripts/install +++ b/scripts/install @@ -113,6 +113,7 @@ ynh_add_systemd_config ynh_script_progression --message="Configuring the app..." --weight=2 ynh_replace_string --match_string="localhost:9090" --replace_string="localhost:$port" --target_file="$final_path/prometheus.yml" +echo " metrics_path: $path_url/metrics" >> "$final_path/prometheus.yml" #================================================= # GENERIC FINALIZATION