elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.69k stars 8.12k forks source link

Central Management only return first 10 tag to beats,other tags are missing #42044

Open gameover453 opened 5 years ago

gameover453 commented 5 years ago

**Kibana version:7.2 dockerize

**Elasticsearch version:7.2 dockerize

**Server OS version: Centos 7.6

Browser version: N/A

Browser OS version: N/A

Original install method (e.g. download page, yum, from source, etc.): docker-image

Describe the bug: Central Management only return 10 tag to filebeat, although the result is returned correctly, if a filebeat is associated with more than 10 tags,another tag are missing.

Steps to reproduce:

  1. create more then 10 tag
  2. enroll a filebeat , Applying settings.
  3. just test it. and show /var/lib/filebeat/management.yml.

Any additional context: I tried to grab the api address of the filebeat call that the packet found. If I try to build the same request, I can reproduce the problem that caused the return(API only return first 10 tags).

{"Kibana-URL"}}/api/beats/agent/{"UUID"}}/configuration

I temporary fixed this problem by adding the following constants, but it should not be the right solution.

Modify: x-pack/legacy/plugins/beats_management/server/lib/configuration_blocks.ts

From:


public async getForTags(
    user: FrameworkUser,
    tagIds: string[],
    page: number = 0,
    size: number = 10
  )

To :

public async getForTags(
    user: FrameworkUser,
    tagIds: string[],
    page: number = 0,
    size: number = 100
  )
elasticmachine commented 5 years ago

Pinging @elastic/beats