-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fleet][APM] APM Server via Elastic Agent Fleet is missing permissions to create data stream #85761
Comments
The problem is that these permissions were not given yet to the user in Kibana: https://github.com/elastic/kibana/blob/master/x-pack/plugins/fleet/server/services/setup.ts#L142 @nchaulet Can you take a look? |
Sure thing, thanks @ruflin . I also identified that the |
Yes adding the permission in the fleet setup and here https://github.com/elastic/kibana/blob/master/x-pack/plugins/fleet/server/services/api_keys/index.ts/#L22-L32 should fix the missing permission issue We do not have a way right now to update the existing API keys so the migration for existing Fleet user from 7.10 to 7.11 will not work for APM out of the box. |
@nchaulet Can you update an issue around the "update API keys permissions" problem? Would be nice if we would have at least a way to "recreate" API Keys for a set of Elastic Agents or similar to upgrade them. |
For 7.11 we are probably not going to support the api key upgrade so we should probably document what users will have to do:
For 7.12 we should probably have a better plan #85777 |
There is no APM integration in 7.10, so 7.10->7.11 migration for APM should not be a problem, right? |
@jalvz We already have users using Fleet in 7.10 so that mean the user ( |
got it, thanks! |
I would not expose this in the UI but only cover by documentation for the experimental APM integration, and it sounds like in the longer term #85777 should handle this in a better way anyways. |
* Add APM traces index names to Fleet enroll role * Removes fleet permissions for `events-*` as they became obsolete fixes #85761
* Add APM traces index names to Fleet enroll role * Removes fleet permissions for `events-*` as they became obsolete fixes elastic#85761
Description of the problem including expected versus actual behavior:
When starting APM Server via Elastic Agent integration with Fleet documents ending up in
log
ormetric
data streams can be written successfully, but the APM Server raises an error when trying to indexspan
andtransaction
documents. For these docs atrace
dataset should be created, but the API Key received from Fleets is missing privileges to create the data stream.Logged Error:
Steps to reproduce:
./scripts/compose.py start master --with-elastic-agent --no-apm-server
docker exec -it <Container-ID> /bin/bash
and send an example request to the APM Server that contains all kinds of events. (For now the APM Server port is not exposed, therefore sending the request from inside the container). For the span and transaction docs the mentioned error is logged. The logs can be found underdata/elastic-agent-<ID>/logs/default/apm-server-json.log*
.This is all a bit manual for now, until we have finished integration APM Server under Elastic Agent into the integration testing repo.
cc @ruflin
The text was updated successfully, but these errors were encountered: