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

Extend local_meta information for elastic agent #1754

Closed
shahzad31 opened this issue Aug 17, 2022 · 13 comments · Fixed by elastic/elastic-agent#3190
Closed

Extend local_meta information for elastic agent #1754

shahzad31 opened this issue Aug 17, 2022 · 13 comments · Fixed by elastic/elastic-agent#3190
Labels
enhancement New feature or request Feature:fleet-server Team:Elastic-Agent Label for the Agent team

Comments

@shahzad31
Copy link

Each registered agent in the fleet contains information about it's local meta

image

For synthetics, we ask user to use elastic-agent-complete variant which also contains browser dependencies. From synthetics plugin in kibana, we would like to determine if the agent registered is complete or not and hence warn user if they are trying to run browser monitor on simple elastic agent.

For that we need that information in the local_meta of the agent. So when user installs an agent and if its an elastic-agent-complete docker image https://hub.docker.com/r/elastic/elastic-agent-complete, we should add a flag saying. Its an es agent complete. So that we can consume that info in kibana.

@ph
Copy link
Contributor

ph commented Aug 17, 2022

This seems really close to what we added #1350, I think all the necessary plumbing logic is present in fleet-server and elastic-agent to populate the data. it's a matter of exposing it to the enroll cli. This would benefit from having @nimarezainia looking at it.

We could use a flag, but I think it's more powerful to allow users to set arbitrarykey=value

See the discussion in elastic/elastic-agent#149

@shahzad31
Copy link
Author

so this will not a user action, we want this boolean to auto added based on the docker image being used.

@ph
Copy link
Contributor

ph commented Aug 17, 2022

I see in this case, it could be added automatically when the elastic agent is run with the container subcommand.

@shahzad31
Copy link
Author

@ph any updates on prioritising this issue?

@cmacknz
Copy link
Member

cmacknz commented Sep 23, 2022

We don't have this on our priority list, you'll want to get in touch with @pierrehilbert about getting this prioritized.

@pierrehilbert pierrehilbert added the Team:Elastic-Agent Label for the Agent team label Dec 6, 2022
@nimarezainia
Copy link

@shahzad31 @cmacknz I am wondering whether it serves us better in the future if we have some sort of a capabilities list? instead of a boolean? a list that can be parsed, for example synthetics can parse for some value they have an interest in etc

I can't immediately think of other use cases but feel that it would serve us better in the future to allow platform users to utilize these advertised capabilities.

@shahzad31
Copy link
Author

@nimarezainia that will work as well.

@nimarezainia nimarezainia removed their assignment Feb 23, 2023
@shahzad31
Copy link
Author

@nimarezainia any update on this?

@nimarezainia
Copy link

@shahzad31 I'm sorry we are currently completely drained for capacity and are mainly concentrating our efforts on stability of software and only some of the highest priority features. Feel free to create a PR that @pierrehilbert or @cmacknz could review for you if it's a small change.

@emilioalvap
Copy link

Hi @cmacknz,

We are looking into contributing to this ourselves, would adding the contents of capabilities.yml to the agent metadata be an appropriate compromise here?

@cmacknz
Copy link
Member

cmacknz commented Jul 24, 2023

Capabilities.yml isn't widely used enough that it would be worth including by default in the agent metadata. We use it in our own cloud to lock down the agent that runs Fleet Server, but that is pretty much the only major use of it that I know of.

This feels like something that can just be a boolean flag under local_metadata.elastic.agent, possibly as simple as local_metadata.elastic.agent.complete: true for example.

We are considering building a lighter weight version of the non-containerized agent, the current default would effectively be the complete version with all binaries included. So this flag would work there too to allow us to distinguish the builds.

@cmacknz
Copy link
Member

cmacknz commented Jul 24, 2023

The current contents of local_metadata.elastic.agent for reference:

  "local_metadata": {
    "elastic": {
      "agent": {
        "build.original": "8.8.2 (build: cdc5ba9b1d2c90fdfd0e998e3e744e46a225c313 at 2023-06-26 16:18:13 +0000 UTC)",
        "id": "a65dd572-d5bb-4b91-b1ac-6781e5e840f5",
        "log_level": "info",
        "snapshot": false,
        "upgradeable": true,
        "version": "8.8.2"
      }
    },

@awahab07
Copy link

awahab07 commented Sep 4, 2023

Post FF Testing

Tested 8.10.0-Snapshot and it LGTM!

docker.elastic.co/beats/elastic-agent:8.10.0-SNAPSHOT docker.elastic.co/beats/elastic-agent-complete:8.10.0-SNAPSHOT
Screenshot 2023-09-04 at 14 09 49 Screenshot 2023-09-04 at 14 10 17

@awahab07 awahab07 removed their assignment Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Feature:fleet-server Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants