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

[Fleet] Add agent input template for the fleet server package #806

Merged
merged 3 commits into from
Mar 29, 2021

Conversation

nchaulet
Copy link
Member

Description

Resolve #803

Currently we do not send the config from kibana to fleet server as there is not input agent template, we should add one.
Screen Shot 2021-03-24 at 2 49 18 PM

This PR fix that by adding an agent template for the fleet server input, I also added the field max_connections introduced here elastic/fleet-server#153

Agent policy with the template
Screen Shot 2021-03-25 at 8 47 03 AM

@nchaulet nchaulet added the Team:Fleet Label for the Fleet team [elastic/fleet] label Mar 25, 2021
@nchaulet nchaulet self-assigned this Mar 25, 2021
@elasticmachine
Copy link

Pinging @elastic/fleet (Team:Fleet)

@elasticmachine
Copy link

elasticmachine commented Mar 25, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #806 updated

  • Start Time: 2021-03-26T12:56:53.823+0000

  • Duration: 12 min 48 sec

  • Commit: 4ba359b

Trends 🧪

Image of Build Times

@@ -38,7 +37,12 @@ policy_templates:
show_user: true
default:
- 8220
- name: max_connections
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this and got the following:

    data_stream:
      namespace: default
    server:
      port: 8220
      host: 0.0.0.0
      max_connections: '12'

I wonder why it treats port as an int but max_connections it doesn't?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch the port was correct because it was using the default value, but both variable types where incorrect I just changed them from text to integer and it's working

Screen Shot 2021-03-26 at 9 17 03 AM

Copy link
Member

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Policy looks as following:

  - id: 3f0744e7-076c-4a6d-94c7-5a961e50dcf7
    name: fleet_server-1
    revision: 2
    type: fleet-server
    use_output: default
    meta:
      package:
        name: fleet_server
        version: 0.2.0
    data_stream:
      namespace: default
    server:
      max_connections: 45
      port: 8220
      host: 0.0.0.0

I assume the data_stream part is just filled in by Kibana, at one stage we should probably remove this.

@ruflin
Copy link
Member

ruflin commented Mar 29, 2021

One thing I noticed is that i can put any value into integers fields like foo and it accepts it. Not directly related to this PR but probably worth to follow up on.

@nchaulet nchaulet merged commit f232caf into master Mar 29, 2021
@nchaulet nchaulet deleted the fix-fleet-server-agent-template branch March 29, 2021 17:42
eyalkraft pushed a commit to build-security/integrations that referenced this pull request Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Fleet Label for the Fleet team [elastic/fleet]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Fleet server integration is missing an input agent template
3 participants