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

Index Pattern wizard does not work on empty indices #15666

Closed
loekvangool opened this issue Dec 18, 2017 · 14 comments
Closed

Index Pattern wizard does not work on empty indices #15666

loekvangool opened this issue Dec 18, 2017 · 14 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages

Comments

@loekvangool
Copy link

Kibana version: 6.1.0

Description of the problem including expected versus actual behavior:
The new Index Patterns wizard does not allow me to continue unless I have data in my indices. I'd like to import some dashboards/viz/saved searches into Kibana before putting actual data there but to import successfully, the index pattern has to exist. In 5.x I could define a pattern in Kibana before putting any data into the indices.

Steps to reproduce:

  1. Start with a fresh ES/KB install
  2. Create an index (Put Mapping)
  3. Try to create an index pattern from that new index. It will state "couldn't find any Elasticsearch data" and block.
  4. If I click "Include system indices", I can manually enter a pattern. It states "The index pattern you've entered doesn't match any indices"
@loekvangool loekvangool changed the title Index Pattern wizard does not allow empty indices Index Pattern wizard does not work on empty indices Dec 18, 2017
@grieke
Copy link

grieke commented Dec 18, 2017

I have the same issue with version 6.1.0. I went back to version 6.0.1, and everything works like it did before.

@chrisronline
Copy link
Contributor

@skearns64 Thoughts on this? Should we support this? We can probably add some kind of option that is like "Yes, I know this index does not exist and I still want to make the index pattern"

@loekvangool
Copy link
Author

Actually, it does exist but it's empty @chrisronline

@skearns64
Copy link

Yea, in this case (the index exists, but is empty), I believe should allow the index pattern to be created.

I believe this issue is caused by the way we search for index names today [1] - we do one search and aggregate on the _index response. If there are no documents in the matching index, it doesn't show up in the response, because there is nothing to aggregate on.

I wonder if we could either make a second request to retrieve the mappings for the specific index, or try an approach that doesn't require the search + aggregate (though I recall this approach having security and possibly performance advantages). Would something like a GET /<provided index pattern>/_alias or GET /<provided index pattern>/_mappings give us enough information?

[1]

@chrisronline
Copy link
Contributor

Definitely worth looking into. I can take a pass later this week

@ycombinator
Copy link
Contributor

ycombinator commented Jan 9, 2018

If you are looking for just an existence check on a single index, HEAD <index name> would work. You might also consider GET <index name>/_stats/docs to get a minimal amount of info back, including the number of docs in the index.

@tavagyan-bb
Copy link

+1 waiting for the fixing of the issue asap as according to my project structure I need to have all my indexes imported in Kibana even empty.
Please note that I did some experiments and could import empty index to Kibana by removing "disabled" property for "Next step" button from network console. :)

@loekvangool
Copy link
Author

loekvangool commented Jan 11, 2018

+1 waiting for the fixing of the issue asap as according to my project structure I need to have all my indexes imported in Kibana even empty.

@tavagyan-bb If you're in a hurry, note that it's perfectly possible to create index patterns on empty indices in Kibana by adding documents to .kibana, and soon by using the Kibana API. I think you can work around this issue so it will not impact your project.

@naisanza
Copy link

I was wondering why it wasn't picking up my index like it did back when I last used ELK, in 4.0 days.

The index does exist, it just doesn't have anything in it.

@mattkime mattkime self-assigned this Oct 17, 2018
@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages and removed :Management DO NOT USE labels Nov 27, 2018
@spicoflorin
Copy link

This problem occurs also in Kibana version 6.5.4. Is this problem fixed? Can you please mention in which version?

@Hronom
Copy link

Hronom commented Mar 30, 2019

So what the status of this, how I can disable this warning/error? I'm on 6.4.2 version now

@lukeelmers lukeelmers added :AppArch and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Apr 16, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

@lukeelmers lukeelmers added Feature:Data Views Data Views code and UI - index patterns before 8.0 bug Fixes for quality problems that affect the customer experience labels Apr 16, 2019
@lukeelmers lukeelmers added this to To triage in kibana-app-arch via automation Feb 19, 2020
@lukeelmers lukeelmers moved this from To triage to 7.7 in kibana-app-arch Feb 19, 2020
@mattkime mattkime moved this from 7.7 to 7.8 in kibana-app-arch Mar 31, 2020
@mattkime mattkime moved this from 7.8 to 7.9 in kibana-app-arch Jun 4, 2020
@mattkime
Copy link
Contributor

addressed by #70271

kibana-app-arch automation moved this from 7.9 to Done in current release Jul 10, 2020
@ksajan
Copy link

ksajan commented Feb 7, 2023

I am having the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages
Projects
kibana-app-arch
  
Done in current release
Development

No branches or pull requests