Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Fix kibana dashboard import #511

Merged

Conversation

branden
Copy link
Contributor

@branden branden commented Sep 12, 2020

What type of PR is this?

Bug

What this PR does/ why we need it:

This fixes the dashboard import script for Kibana by overriding a couple default chart values. It sets dashboardImport.basePath to an empty string to prevent the dashboard import script from making requests to locations that return 404. It also increases the timeout from 60 to 180 seconds to give the Kibana API more time to become ready before the import script executes.

The dashboard import script's API queries are returning 404 because it requests paths with an extra beginning slash, e.g. //api/status. This worked until we upgraded Kibana from 6.8.2 to 6.8.10. Kibana 6.8.7 upgrades nodejs to 10.19.0, which introduces stricter HTTP parsing, which may explain the change. The Kibana chart deploys Kibana 6.7.0 by default, which is likely why the upstream bug hasn't been fixed yet.

Which issue(s) this PR fixes:

https://jira.d2iq.com/browse/D2IQ-71039

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Fixes an issue that causes Kibana to deploy without an audit log dashboard.

Checklist

  • The commit message explains the changes and why are needed.
  • The code builds and passes lint/style checks locally.
  • The relevant subset of integration tests pass locally.
  • The core changes are covered by tests. (A corresponding test will arrive in an upcoming PR, see https://jira.d2iq.com/browse/D2IQ-71039).
  • The documentation is updated where needed.
  • Manually tested upgrades from previous addon revisions for updated addons.

The default basepath is `/`, however this causes the dashboard import
script to make requests to e.g. `//api/status`, which returns a 404.
Removing the extra `/` by emptying the basepath fixes this problem.
This extends the timeout for the dashboard import script to wait for the
API to become available from 60 to 180 seconds.
@branden branden added the wip label Sep 12, 2020
@branden branden requested a review from a team as a code owner September 12, 2020 01:25
@branden branden self-assigned this Sep 12, 2020
Copy link
Contributor

@alejandroEsc alejandroEsc left a comment

Choose a reason for hiding this comment

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

LGTM

@samvantran samvantran merged commit c52c38e into d2iq-archive:master Sep 15, 2020
@branden branden deleted the branden/kibana-dashboard-import branch September 15, 2020 18:29
branden added a commit to branden/kubernetes-base-addons that referenced this pull request Sep 24, 2020
* Bump kibana addon revision

* Set empty API basepath for dashboard import script

The default basepath is `/`, however this causes the dashboard import
script to make requests to e.g. `//api/status`, which returns a 404.
Removing the extra `/` by emptying the basepath fixes this problem.

* Set dashboard import timeout to 180

This extends the timeout for the dashboard import script to wait for the
API to become available from 60 to 180 seconds.

Co-authored-by: Sam Tran <[email protected]>
@branden branden mentioned this pull request Sep 24, 2020
5 tasks
branden added a commit to branden/kubernetes-base-addons that referenced this pull request Sep 24, 2020
* Bump kibana addon revision

* Set empty API basepath for dashboard import script

The default basepath is `/`, however this causes the dashboard import
script to make requests to e.g. `//api/status`, which returns a 404.
Removing the extra `/` by emptying the basepath fixes this problem.

* Set dashboard import timeout to 180

This extends the timeout for the dashboard import script to wait for the
API to become available from 60 to 180 seconds.

Co-authored-by: Sam Tran <[email protected]>
(cherry picked from commit c52c38e)
joejulian pushed a commit that referenced this pull request Sep 24, 2020
* Bump kibana addon revision

* Set empty API basepath for dashboard import script

The default basepath is `/`, however this causes the dashboard import
script to make requests to e.g. `//api/status`, which returns a 404.
Removing the extra `/` by emptying the basepath fixes this problem.

* Set dashboard import timeout to 180

This extends the timeout for the dashboard import script to wait for the
API to become available from 60 to 180 seconds.

Co-authored-by: Sam Tran <[email protected]>
(cherry picked from commit c52c38e)
@joejulian joejulian modified the milestone: release/2.5 Sep 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants