官术网_书友最值得收藏!

Elasticsearch query DSL

Kibana accepts Lucene query syntax or Elasticsearch query DSL for querying through the index. It also supports the new Kuery language, but for that we need to enable it by clicking on Management and then on Advanced Settings. On the Advanced Settings page, we have the following two options:

  • Set search:queryLanguage:switcher:enable to true
  • Set the default language to search:queryLanguage 

Now, we have Packetbeat data in the Elasticsearch index, which we can use to get the answers for our questions. So, let's say we want to check what is happening on a certain port on the server. We can track it using the search box:

source.port:80

If we want to get only the records that have the source port as 80 and the transport type is tcp, we can modify the query and join both conditions with AND to filter out the result:

source.port:80 AND transport:tcp

The following screenshot shows the result of the filter option, source.port:80, through which we are getting the records where the source port number is 80:

In the previous screenshot, we can see the search criteria as source.port:80, and after searching, the result has been highlighted with the search value. By combining the search criteria with AND/OR, we can get more relevant results and drill down into the data. When we submit the search request, the document table, histogram, and field lists are updated as per our search results. After searching, the total number of matching documents is shown on the top part of the page as a number of hits. We have 350 hits.

Document listing is shown in reverse chronological order, which means that the newest document is first on the listing. We can change this by clicking on the up/down arrows in front of the time column in the document display.

主站蜘蛛池模板: 永新县| 澄迈县| 华宁县| 台南县| 正定县| 丰县| 张家港市| 石阡县| 天柱县| 张家口市| 上虞市| 奇台县| 宜君县| 刚察县| 博乐市| 双牌县| 德兴市| 芷江| 理塘县| 手机| 南岸区| 浮山县| 白山市| 沿河| 阜康市| 鄂托克旗| 共和县| 贡山| 永丰县| 丹凤县| 山东省| 鸡西市| 衡山县| 治多县| 昭苏县| 德令哈市| 安乡县| 板桥市| 崇礼县| 额济纳旗| 巴东县|