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

Disable migration aliases in index pattern #10478

Merged
merged 2 commits into from
Feb 4, 2019

Commits on Feb 4, 2019

  1. Disable migration aliases in index pattern

    The migration aliases should not show up in the index pattern if `migration.enabled: false`. For this to happen, the Kibana index pattern must be generated on the fly instead of packaging it with each Beat. This PR introduces the generation of the index pattern when Kibana data is loaded.
    
    APM still needs the index pattern as file. For this the export command `index-pattern` was added. It will print the index pattern to the standard out:
    
    ```
    ./metricbeat export index-pattern > pattern.json
    ```
    
    The commands to generate the index pattern in the dev environment were removed.
    
    For checking if aliases are supported, the Kibana version is checked. Fully accurate would be to check the Elasticsearch version as it depends on the ES version in the end and not Kibana. But it's assume that in general the same minor version is used. The reason not Elasticsearch is checked as it would potentially require additional config options and adds unnecessary complexity.
    
    For the index pattern the internal fields.go are used. Even if fields.yml is configured still fields.go is used. This is the same behavior as we had so far when the index pattern was generated. It could be improved in the future to also support a fields.yml for the generation if needed.
    
    In general this PR tried to change as little code as possible. The code and tests around the Kibana dashboard generation and index pattern generation is not very nice. One reason is that it also contains old logic which was used for previous versions but also has the ability to read dashboards from a zip file. Because of this all the old capabilities have to stay in the code for now. The code should be cleaned up at a later stage.
    
    Further changes:
    
    * Added system tests to Filebeat to check for correct content in index pattern when migration is enabled.
    * Fix double generation of common.yml in Metricbeat. It seems some changes in the past caused that the common.yml file was contained in two fields.go files in Metricbeat
    ruflin committed Feb 4, 2019
    Configuration menu
    Copy the full SHA
    f915027 View commit details
    Browse the repository at this point in the history
  2. cleanup tests and makefile

    ruflin committed Feb 4, 2019
    Configuration menu
    Copy the full SHA
    c3341db View commit details
    Browse the repository at this point in the history