-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
index_pattern
under visState.params cannot be empty ""
#18865
Conversation
Pinging @elastic/integrations-platforms (Team:Platforms) |
❕ Build Aborted
Expand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
@@ -270,13 +270,14 @@ type dashboardObject struct { | |||
Title string `json:"title"` | |||
KibanaSavedObjectMeta *struct { | |||
SearchSourceJSON struct { | |||
Index string `json:"index"` | |||
Index *string `json:"index"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a pointer here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a pointer here because I need to distinguish if this field exists or the value of this field is empty string ""
. Without the pointer, even if VisState.Params
doesn't have IndexPattern
field, it will return ""
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Looking at the affected dashboards, they seem to be some of the most recent ones, I wonder if something has changed in Kibana or the dashboards exporter that provokes this difference.
Maybe we can modify the dashboards exporter to fill these parameters with correct values.
...eat/module/kubernetes/_meta/kibana/7/dashboard/Metricbeat-kubernetes-controller-manager.json
Show resolved
Hide resolved
* `index_pattern` under visState.params cannot be empty ""
…) (elastic#18943) * `index_pattern` under visState.params cannot be empty "" (cherry picked from commit fbe67a0)
This PR is to add check to make sure
index_pattern
under visState.params not be empty""
. For example in metricbeat dashboard/visualization, when default index is notmetricbeat-*
in Kibana and index_pattern is set to""
, visualizations will take the default index pattern by default. If the default index pattern is notmetricbeat-*
, then these dashboards will fail and show no data.This PR is to not only fix the rest of the dashboards having this issue but also adding the check in
mage/check.go
.Related PR: #18698
Discuss Forum Link: https://discuss.elastic.co/t/metricbeats-dashboards-for-kubernetes-controller-manager/233402/4
This PR also improved the error message on which visualization failed the test: