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

Extract Kibana dashboards #7224

Merged
merged 3 commits into from
Jun 4, 2018
Merged

Commits on May 31, 2018

  1. Extract Kibana dashboards

    Currently when a PR is opened to change or add a dashboard the PR's are hard to review even if only a small detail was changed. The reasons is that the Kibana json objects contain json as string. The content inside these strings is valid JSON if it is decoded.
    
    With this PR the dashboards in Metricbeat are modified that they contain the full decoded JSON objects instead of the string. Additional the JSON entries are sorted. This makes also the content of the visualisations readable, will create minimal diffs and allows to even apply small fixes on the code base. In addition we can now validate if it's valid JSON and introduce automatic scripts to remove potentially unneeded fields from the dashboards to clean them up.
    
    All the existing dashboards were decoded with the following command:
    ```
    python ../libbeat/scripts/unpack_dashboards.py --transform=decode --glob="/Users/ruflin/Dev/gopath/src/github.com/elastic/beats/metricbeat/module/*/_meta/kibana/6/dashboard/*.json"
    ```
    
    This command has to be applied to dashboards exported from Kibana before adding them to the module directory.
    
    To make sure the import still works as before, on collection of the dashboard they are converted back into the encoded format.
    
    This change currently only applies to Metricbeat dashboards but could be applied to all.
    ruflin committed May 31, 2018
    Configuration menu
    Copy the full SHA
    8fed351 View commit details
    Browse the repository at this point in the history
  2. cleanup script

    ruflin committed May 31, 2018
    Configuration menu
    Copy the full SHA
    907dc4f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ea3f251 View commit details
    Browse the repository at this point in the history