Elasticsearch queries in kibana


(computer engineer) #1

I have setup a dashboard that displays incoming message rates in a graph,
filtered terms in a pie graph and all with nothing really to do. I want to
be able to display a table/graph or some other type of panel to display
elapsed time between two datetime fields that appear in my message:

*{"pubDate":"2014-02-27T07:11:44", "fetchDate":"2014-02-27T07:11:55", "client":"ME", "query":"(work
OR my job boring OR mundane OR stodgy OR interesting OR sucks OR
exciting OR fun)", "lang":"en"} *
What I am able to get now is a language filter graph, and a query filtered
pie chart with the normal incoming rate graph as well. I want to create a
graph/table that gives the difference between the pubdate and fetchdate. I
found some suggestions as follows:

*script_fields, which allow calculations with dates: curl -XPOST
localhost:9200/test/test/_search -d '{"query":{"match_all":{}},
"script_fields":{
"interval":{"script":"doc["fetchDate"].value-doc["pubDate"].value"}}}' *

The problem is that my first and only implementation has been a basic conf
to consume all messages and then creating the queries and panels in kibana.
All simple queries and I can view the json script when clicking on the
inspect button but not sure how do I create the same query in Kibana to
display in a table.

Also related to same project is that the query field does not work
correctly in that elasticsearch seems to break long queries into individual
terms and I wonder if it interperates the OR itself or just based on
length.
For example I set up a bar graph to display the counts of the most common
values for a field query with examples like these:

(work OR my job boring OR mundane OR stodgy OR interesting OR sucks OR
exciting OR fun)

But it displays each single query: more powerful than I want.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/831d1fbe-b9ee-4db6-aa35-103a6a3d2a5f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #2