1
     {
            "_index": "application-log",
            "_type": "test-engine",
            "_id": "AV9VzAc7lm36MlYWpRYH",
            "_score": 1,
            "_source": {
                "@timestamp": "2017-10-25T23:09:15.203+0000",
                "message": "Initiating connection to node -1 at 107.23.134.14:9092.",
                "host": "54.205.134.57",
                "severity": "DEBUG",
                "thread": "Thread-4",
                "logger": "org.apache.kafka.clients.NetworkClient"
            }
        }

I'm a beginner for elastic-search, I need a query for logger=org.apache.kafka.clients.NetworkClient

1
  • Please share your index mapping. Commented Oct 26, 2017 at 14:09

1 Answer 1

2

You can query like this using curl.

curl -XGET "http://localhost:9200/application-log/eportal-engine/_search" -H 'Content-Type: application/json' -d'
{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "logger.keyword": {
              "value": "org.apache.kafka.clients.NetworkClient"
            }
          }
        }
      ]
    }
  }
}'

Kibana equivalent of the above query :

GET application-log/eportal-engine/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "logger.keyword": {
              "value": "org.apache.kafka.clients.NetworkClient"
            }
          }
        }
      ]
    }
  }
}
Sign up to request clarification or add additional context in comments.

2 Comments

Please share your index mapping.
Paste the output of this command: curl -XGET localhost:9200/application-log

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.