2
votes

I have setup elasticsearch(version 1.7.3) and Kibana(version 4.1.2) for indexing our application's Elmah XML files errors. I am using .Net to parse the xml files and Nest ElasticSearch client to insert the indexes into ElasticSearch. The issue is that Kibana doesn't display any data in the "Discover" tab.

When I run curl -XGET localhost:9200/.kibana/index-pattern/eol? command, I get the following response:

{"_index":".kibana","_type":"index-pattern","_id":"eol","_version":2,"found":tru
e,"_source":{"title":"eol","timeFieldName":"errorTime","fields":"[{\"name\":\"_i
ndex\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"an
alyzed\":false,\"doc_values\":false},{\"name\":\"filePath\",\"type\":\"string\",
\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\"
:false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\
"indexed\":true,\"analyzed\":false,\"doc_values\":false},{\"name\":\"message\",\
"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":
true,\"doc_values\":false},{\"name\":\"errorTime\",\"type\":\"date\",\"count\":0
,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":false},{\
"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"indexe
d\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_id\",\"type\":\"
string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"d
oc_values\":false}]"}}

Current situation Elasticsearch is up and running, responds to API executing a query directly on Elasticsearch like http://localhost:9200/eol/_search?q=* returns lots of results

enter image description here

Kibana is up and running, even finds the "eol" index exposed by Elasticsearch Kibana also shows the correct properties and data type of the "eol" documents "Discover" tab doesn't show any results...even when setting the time period to a couple of years... I have tried Delete the index from the Settings tab, restart Kibana, then re-adding index in Settings. I have also tried to save the date field with a yyyy-MM-ddThh:mm:ss format but I still do not see any results. I believe the issue is with either the Elmah UTC date format(An example is 2015-10-13T19:54:49.4547709Z) or the Elmah message. I guess ElasticSearch likes the Elmah message but Kibana does not.

Any ideas??

Here's how Kibana sees the "eol" index: enter image description here

..and what I see in the discover tab: enter image description here enter image description here

2
This could be the time issue. Can you take something like "Last 5 years" and see if there are any results.Vineeth Mohan
@VineethMohan: when I search for last 12 hours, kibana does not show anything. I am currently running the search for last 5 years.Ajit Goel
@VineethMohan: No data was found if I search for the last 5 years.Ajit Goel
Can you show what you get with curl -XGET localhost:9200/.kibana/index-pattern/eol? I find it weird that no fields are listed under "Available fields" even though they show up in Settings > Indices.Val
Can you also show the log trace you're getting in where querying Kibana? And finally what version of Kibana are you running? We'll make it work, no worries...Val

2 Answers

1
votes

I was using Nest to insert data into ElasticSearch. It seems that the way Nest is serializing a List and making a request to ElasticSearch has special characters that Kibana does not like.

Before(Not working):

private static void WriteErrorsIntoElasticSearchIndex(ElasticClient elasticClient, List<error> errors)
        {
                elasticClient.Index(errors);    
        }

After(working):

private static void WriteErrorsIntoElasticSearchIndex(ElasticClient elasticClient, List<error> errors)
        {
            foreach (var error in errors)
            {
                elasticClient.Index(error);    
            }
        }
0
votes

you have "\" , normally in elasticsearch result there is not, JSON can not parse the result because it is not appropriate,