How to plot a line graph in kibana using 2 indexes

(Abhishek) #1


I want to get data from multiple indexes and they might not have same pattern. I tried but it seems that I can get data from single index only at a time because it looks like discover works with only one index. I don't want to run query on on all indexes (because i have 200 indexes and I want to use only 2 indexes for performing search)
So I want something like -
Get data from index1 || index2


(Mark Walkom) #2

It works with patterns. What are your index names?

(Abhishek) #3

Lets say for example I have index names -


and i want data from TEST-2015-12-31 and TEST-2016-01-01 only..

(Mark Walkom) #4

Well, you could use a pattern like TEST-* and then limit the timeframe to those two days.
But I don't think it's exactly what you want.

(Abhishek) #5

My concern is it matches all indexes (TEST-*) and i believe it will end up searching all documents in all index where as i really want is last 2 daysof index to show on graphs. Like anytime i open a graph I want to see today's and yesterday's data only because i have around 50 billion records and around more than 60 indexes with any one pattern (like 60 days of data)

(Mark Walkom) #6

KB doesn't do that, if you want a specific timeframe it will only query the indices that have data that match it.

(Abhishek) #7

and how it knows that? I mean i can have index with any name (including date in index doesnt mean anything thats what i think) So finally it needs to go to the document in each index and check the timestamp field in document to decide right ?

(Mark Walkom) #8

It uses

I should note, this only applies to newer versions of KB, I think it was used from 4.3 or so onwards.

(system) #9