Skip to content
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

Expose conditions to package UI vars #935

Closed
ChrsMark opened this issue Apr 22, 2021 · 1 comment
Closed

Expose conditions to package UI vars #935

ChrsMark opened this issue Apr 22, 2021 · 1 comment

Comments

@ChrsMark
Copy link
Member

This is mostly applies on kubernetes package and for cluster-level metrics collection using leaderelection. Today we use leaderelection provider of Agent so as to enable specific datastreams of k8s integration only when the Agent holds the leadership lock. This gives as the option to coordinate Agents of the Daemonset so as to have only of them at a time to be collecting cluster-level metrics.

If we are able to deploy Agents on k8s and automatically enrol them to fleet (see elastic/beats#25237) then we should be able to enable k8s integration from Kibana. In order to achieve this we need to separate which datastreams are for all agents and which are only for the leader. To check for leadership we can use a condition (see https://github.com/elastic/beats/blob/2f104b87c851cbffe2b82b05c01b5190e06875c1/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml#L29) and only enable the datastream if leadership check is true.

For this to happen through the UI we might need to expose the option to define conditions on package level (not hidden behind by default like at https://github.com/elastic/integrations/blob/88b02e1ec40e122fa0de28f4b777cb51b3aba[…]s/linux/data_stream/network_summary/agent/stream/stream.yml.hbs) and have leadership condition there by default for state_* datastreams. Users who do not want to use leadership condition can just remove the default condition and leave the setting blank in the UI input.

Same approach can be used today so as to define conditions based on kubernetes provider which will allow us to enable packages from kibana UI with autodiscovered targets (like https://github.com/elastic/beats/blob/2f104b87c851cbffe2b82b05c01b5190e06875c1/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml#L338).

cc: @exekias @sorantis @mukeshelastic

@botelastic
Copy link

botelastic bot commented Sep 19, 2022

Hi! We just realized that we haven't looked into this issue in a while. We're sorry! We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Sep 19, 2022
@botelastic botelastic bot closed this as completed Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant