Skip to content

Unable to add HTTPS external service #4935

@runleveldev

Description

@runleveldev

Description

Attempting to add an external service with scheme https fails with status code 400. As shown in the logs below, despite using the https scheme, the request is sent as http resulting in a 400 Bad Request error. This is for an internal app with a builtin Prometheus exporter so we were able to work around by exposing the Prometheus endpoint over HTTP on a different port but that's not an ideal solution.

Expected Results

Adding an https service should use https for the requests.

Actual Results

Adding an https external service results in http requests.

Version

# docker exec -it pmm-server pmm-admin --version
ProjectName: pmm-admin
Version: 3.5.0
PMMVersion: 3.5.0
Timestamp: 2025-11-14 22:24:53 (UTC)
FullCommit: 586a9227547b4991e5ee3edf793dcd22b6c08117

Steps to reproduce

  1. Add an external service via the web ui
  2. Either parse from url or manually
  3. Ensure the URL is https:// or the HTTPS schema is selected
  4. Add Service
  5. Observe Connection check failed: Unexpected HTTP status code: 400. Expected: 200.

Relevant logs

==> pmm/logs/pmm-managed.log <==
time="2026-01-15T14:41:24.010+00:00" level=info msg="Starting RPC /management.v1.ManagementService/AddService ..." request=<REQUEST_ID>
time="2026-01-15T14:41:24.033+00:00" level=info msg="CheckConnectionRequest: type: SERVICE_TYPE_EXTERNAL_SERVICE, DSN: http://<HOST>:443/metrics timeout: seconds:3." request=<REQUEST_ID>
time="2026-01-15T14:41:24.056+00:00" level=info msg="CheckConnection response: error:\"Unexpected HTTP status code: 400. Expected: 200\"." request=<REQUEST_ID>
time="2026-01-15T14:41:24.057+00:00" level=warning msg="RPC /management.v1.ManagementService/AddService done in 46.202872ms with gRPC error: rpc error: code = FailedPrecondition desc = Connection check failed: Unexpected HTTP status code: 400. Expected: 200." request=<REQUEST_ID>

Code of Conduct

  • I agree to follow Percona Community Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions