Kibana No results found for my index pattern


(Farhad Yousefi) #1

I insert this pattern to find my object when I search in kibana

curl -XPUT 'localhost:9200/exception_index?pretty' -H 'Content-Type: application/json' -d'
{
  "mappings": {
    "siam_exception": { 
      "dynamic": "true", 
      "properties": { 
        "Title":    { "type": "text"  }, 
        "Date&Time":     { "type": "text"  },
        "Tags":     { "type": "text"  },
        "Level":     { "type": "text"  },  
        "Message":     { 
         "dynamic": "true", 
         "properties": { 
           "Root":      { "type": "text" },  
           "ExceptionList":      { "type": "text" } 
          }
        }    
      }
    }
  }
}
' 

and this is my exception.log

"siam_exception":{
 "Title": "exception",
 "Date&Time": "2018-01-21 09:52:20.759950",
 "Tags": "SiamCore",
 "Level": "Fatal", 
 "Message":[
   {
     "Root": "( ['MQROOT' : 0x7f0a902b2d80]
  (0x01000000:Name  ):Properties = ( ['MQPROPERTYPARSER' : 0x7f0a902bffa0]
    (0x03000000:NameValue):MessageSet             = 'SIAMCOMMONMSG' (CHARACTER)",
 
     "ExceptionList": "(0x03000000:NameValue):ReplyIdentifier        = X'000000000000000000000000000000000000000000000000' (BLOB)","
   }
 ] 
}

but kibana find nothing when I search *
even if I omit ' "siam_exception": ' from first line of exception.log nothing change

curl localhost:9200/_cat/indices?pretty
yellow open exception_index el6BhZjASvieULHCd3DzRw 5 1 0 0 650b 650b

when I put my object manually in elasticsearch it work fine
curl -XPUT 'localhost:9200/exception_index/siam_exception/1?pretty' -H 'Content-Type: application/json' -d'
{
"Title": "This doc adds a new field",
"Date&Time": "2018-01-21 09:52:20.654654",
"Tags": ["SiamCore","SiamGetaway"],
"Level": "Fatal",
"Message": [{
"Root" : " test 1111",
"ExceptionList" : "test1"
}]
}
'

my query for search

curl -XGET 'localhost:9200/_search?pretty' -H 'Content-Type: application/json' -d'
{
   "query": {
       "query_string" : {
           "default_field": "Message.Root",
           "query" : "test*"
       }
   }
}
'

the result OK but it doesn't work when object is in exception.log and I want to search it in kibana
what is my problem
thank you


(Peter Pisljar) #2

i guess i don't really understand your question, but here is what i tried:

  • created index pattern using your curl request above
  • indexed one document using your curl request above
  • went to kibana, added new index pattern
  • went to discover, selected your index pattern and i can see the document show up

could you try to explain to me what exactly is the issue you are encountering ?

thanks!


(Farhad Yousefi) #3

thank for replying.
My pattern have been loaded exactly in elasticsearch and when I put my test object (curl -XPUT 'localhost:9200/exception_index/siam_exception/1?pretty' ) I can see my result (by running localhost:9200/_search?pretty) . but I search this pattern in my exception.log and after putting my pattern into elasticsearch, kibana found nothing.
how can i find my object in kibana.
thank you


(Peter Pisljar) #4

how did you put your pattern into elasticsearch ? (what did you use to index that document)
it seems indexing didn't work as expected ?


(Farhad Yousefi) #5
curl -XPUT 'localhost:9200/exception_index?pretty' -H 'Content-Type: application/json' -d'
{
  "mappings": {
    "siam_exception": { 
      "dynamic": "true", 
      "properties": { 
        "Title":    { "type": "text"  }, 
        "Date&Time":     { "type": "text"  },
        "Tags":     { "type": "text"  },
        "Level":     { "type": "text"  },  
        "@timestamp": {"type": "date"},
        "Message":     { 
         "dynamic": "true", 
         "properties": { 
           "Root":      { "type": "text" },  
           "ExceptionList":      { "type": "text" } 
          }
        }    
      }
    }
  }
}
'

(Farhad Yousefi) #6

and it is the my object in exception.log

"siam_exception":{
 "Title": "exception",
 "Date&Time": "2018-01-21 09:52:20.759950",
 "Tags": "SiamCore",
 "Level": "Fatal", 
 "Message":[
   {
     "Root": "(MessageFormat", 
     "ExceptionList": "RecoverableException"
   }
 ] 
}

(Farhad Yousefi) #7

Is there any help? it really drive me crazy. thx


(system) #8

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.