Skip to content

Commit 0fa7de6

Browse files
authored
Don't swallow Kibana index pattern errors (elastic#20121) (elastic#20195)
While running 'beat setup --dashboads' any errors that occur while importing the generated Kibana index pattern or silently ignored. This changes that by causing the dashboard setup to stop and return the error. Dashboards won't work without the index pattern anyways. (cherry picked from commit 7a7279f)
1 parent b50bfa1 commit 0fa7de6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.next.asciidoc

+1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ field. You can revert this change by configuring tags for the module and omittin
172172
- Server-side TLS config now validates certificate and key are both specified {pull}19584[19584]
173173
- Fix terminating pod autodiscover issue. {pull}20084[20084]
174174
- Fix seccomp policy for calls to `chmod` and `chown`. {pull}20054[20054]
175+
- Output errors when Kibana index pattern setup fails. {pull}20121[20121]
175176

176177
*Auditbeat*
177178

libbeat/dashboards/importer.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,9 @@ func (imp Importer) ImportKibanaDir(dir string) error {
300300

301301
// Loads the internal index pattern
302302
if imp.fields != nil {
303-
imp.loader.ImportIndex(imp.fields)
303+
if err = imp.loader.ImportIndex(imp.fields); err != nil {
304+
return errw.Wrap(err, "failed to import Kibana index pattern")
305+
}
304306
}
305307

306308
dir = path.Join(dir, versionPath)

0 commit comments

Comments
 (0)