-
Notifications
You must be signed in to change notification settings - Fork 717
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
Support APM Agent Config Management: #1264
Comments
FYI starting with 7.5 Agent Config Management will be GA and supports backend and RUM agents. |
In ESS agent configuration management is turned on by default. The mentioned default connection to Kibana would improve usability when making use of this feature. |
I started to work on this issue while I'm experimenting with the APM Server. I guess it doesn't make sense to just have a Kibana reference in the APM Server specification ? IIUC Kibana and the APM Server must share the same Elasticsearch cluster.
It raises the question of how to deal correctly with the Elasticsearch reference:
|
Right now APM Server uses the Kibana connection only for querying information managed by Kibana. It does not use the Kibana connection for any index pattern or dashboard setup. Therefore it doesn't directly care about the Elasticsearch instance used by Kibana. A default reference to the started Kibana instance should be enough, no extra handling for underlying Elasticsearch instances is necessary (from an APM Server point of view). The default reference to ES can be overwritten via APM Server, the default Kibana reference also needs to support user configuration. |
I'm not sure that there is a "default reference", or maybe I didn't get what is it. apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: es-sample
spec:
version: 7.5.0
nodeSets:
- name: default
count: 3 apiVersion: apm.k8s.elastic.co/v1
kind: ApmServer
metadata:
name: apm-sample
spec:
version: 7.5.0
count: 1
elasticsearchRef:
name: "es-sample" Now let say that the user has created a Kibana instance somewhere referencing the Elasticsearch cluster: apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: kb-sample
spec:
version: 7.5.0
count: 1
elasticsearchRef:
name: "es-sample" And let say that the user wants to add a connexion between the APM Server and Kibana, the idea would be to enhance the spec of the APM Server by adding a reference to Kibana in the APM spec, something like that: apiVersion: apm.k8s.elastic.co/v1
kind: ApmServer
metadata:
name: apm-sample
spec:
version: 7.5.0
count: 1
elasticsearchRef:
name: "es-sample"
kibanaRef: # here
name: "kb-sample" My questions are:
I don't think we have to answer these questions to have a first implementation. We must add something like |
Sorry for not responding earlier, lost track of this.
IMO we don't need to safeguard against this. In theory users are free to define a Kibana instance pointing to whichever underlying ES instance when running APM Server on-prem. However, for APM UI to work properly you are right that Kibana and APM Server should point to the same Elasticsearch instance, as the information the server queries from Kibana will only be there when APM data exist. What I mean with default is exactly what you show in the example above, providing a straight forward way for users to connect APM Server to an ES and Kibana instance also created by ECK.
Users can configure outputs different than ES, e.g. using Kafka or logstash as direct output. Therefore only referencing Kibana can be a valid use case. It would be up to the users then to ensure their chosen output sends APM data to the same ES instance as referenced by Kibana. But I would say that is out of our control. |
One question that came up in connection with #2657 is what user should be used for APM agent config management and what privileges does that user need. I tried it with a superuser and that works of course but I assume we want a more restrictive role set. |
The APM Server has automated tests for agent config management using a user that has the built in |
From a ui perspective the user only needs write access to the APM app in Kibana to be able to see and create configurations. |
@simitt @sqren I tried to used the
I can see this warning in the Kibana logs which suggests that something is wrong:
And the configuration is not propagated: Could you give me more details about the Also do you have any suggestion if we had to design a e2e/"high level" test in ECK to check that the association between the APM Server and Kibana is successful ? Thank you for your help ! |
@barkbay Thanks for the heads up - we might have to improve the docs here if they are not clear. To access the endpoint Afaik there are no built-in users that handles this so for now the user must create a custom role that has read access to the APM app: @bmorelli25 Do you think we should update the docs to clarify this? |
@bmorelli25 and I have spent some time last week identifying the roles and privileges and improving the docs; related issue and WIP PR. |
Starting with 7.3 APM server includes agent config management which requires a Kibana connection. We could facilitate the establishment of that connection in a similar way as we do for the Elasticsearch output by allowing users to simply specify a reference to a Kibana resource.
We would also need to specify a Kibana user with the correct permissions
The text was updated successfully, but these errors were encountered: