Multi-target exporters

One of our nodes uses a multi-target exporter, in shorts we do this to retrieve metrics:

curl $HOST/probe?target=

We’re evaluating PMM and I’m trying to add this exporter as an external service with pmm-admin like this:

pmm-admin --debug add external --listen-port XXXX --service-name=XXXX --metrics-path="/probe?target=

but it doesn’t work, I get this error:

DEBUG 2021-07-26 18:49:13.095858754Z: /tmp/go/src/*Runtime).Submit() POST /v1/management/External/Add HTTP/1.1
User-Agent: Go-http-client/1.1
Content-Length: 243
Accept: application/json
Authorization: Basic GWRtaW...GV1cw==
Content-Type: application/json
Accept-Encoding: gzip


DEBUG 2021-07-26 18:49:13.640543616Z: /tmp/go/src/*Runtime).Submit() HTTP/1.1 400 Bad Request
Content-Length: 193
Connection: keep-alive
Content-Type: application/json
Date: Mon, 26 Jul 2021 18:49:13 GMT
Server: nginx

  "error": "Connection check failed: Unexpected HTTP status code: 404. Expected: 200.",
  "code": 9,
  "message": "Connection check failed: Unexpected HTTP status code: 404. Expected: 200."
DEBUG 2021-07-26 18:49:13.640805085Z: /tmp/go/src/ main.main() Result: <nil>
DEBUG 2021-07-26 18:49:13.640873385Z: /tmp/go/src/ main.main() Error: &external.AddExternalDefault{_statusCode:400, Payload:(*external.AddExternalDefaultBody)(0xc000103940)}
Connection check failed: Unexpected HTTP status code: 404. Expected: 200.

I’ve also tried with and without double quotes in the metrics-path value but still no luck.

Does anyone know if pmm-admin can handle multi-target exporters?

Thank you in advance.

Hi @papasj
Thank you for your question.

Could you check if exporter accessible from PMM Server?
And check node address in inventory address if it’s the same that you use in your curl script

Best regards,

1 Like