APM configuration via API

Kibana version: 7.5.2

Elasticsearch version: 7.5.2

APM Server version: 7.5.2

APM Agent language and version: Java - 1.12.0

Can I POST via curl in this endpoint (http://localhost:8200/config/v1/agents) and create and edit the agent configuration? How?

I tried this command. Returns success but changes are not made:

curl -X POST -d '{"service":{"name":"NAME","environment":"All","capture_body":"on","transaction_max_spans":"500","transaction_sample_rate":"1"}}' -H "Accept: application/json" -H "Cache-Control: no-cache" "http://localhost:8200/config/v1/agents"


2020-02-05T16:41:53.080Z|INFO|[request]|middleware/log_middleware.go:76|not modified|{"request_id": "bbe046fc-921e-422f-b024-c1da46953617", "method": "POST", "URL": "/config/v1/agents", "content_length": 641, "remote_address": "", "user-agent": "elasticapm-java/1.12.0", "response_code": 304}

|2020-02-05T16:41:57.369Z|INFO|[request]|middleware/log_middleware.go:76|request ok|{"request_id": "9aeba4a1-b5d2-4543-9e38-b7b43b20a14a", "method": "POST", "URL": "/config/v1/agents", "content_length": 128, "remote_address": "", "user-agent": "curl/7.61.1", "response_code": 200}|

The write API for agent configuration is in kibana. I've just opened https://github.com/elastic/kibana/issues/57005 to track getting that documented.

1 Like


This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.