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

Using fields to search

When we explored the GUI in Chapter 1, The Splunk Interface, you probably noticed fields everywhere. Fields appear in the field picker on the left and under every event. Where fields actually come from is transparent to the user, who simply searches for key=value. We will discuss adding new fields in Chapter 3, Tables, Charts, and Fields, and in Chapter 11, Configuring Splunk.

Using the field picker

The field picker gives us easy access to the fields (currently defined) for the results of our query. Splunk will extract some fields from event data without your help, such as host, source, and sourcetype values, timestamps, and others. Additional fields to be extracted can be defined by you. Clicking on any field presents us with the details about that field in our current search results:

As we go through the following items in this widget, we see a wealth of information right away:

  • N Value, X% of events is a good indication of whether we are getting the results we think we're getting. If every event in your results should contain this field, and this is not 100 percent, either your search can be made more specific or a field definition needs to be modified. In addition, N Value indicates the number of unique values that this field contains.
  • SelectedYes or No indicates whether the field is selected (is part of the search query results) or not (simply listed as interesting additional fields found by Splunk within the data).
  • ReportsTop Values, Top Values by time, Rare values, and Events with this field
    • Top values (overall) shows a table of the most common values for this field for the time frame searched.
    • Top values by time shows a graph of the most common values occurring in the time frame searched.
    • Rare values shows a table of the most unique values for this field for the time frame searched.
    • (Show only) Events with this field adds fieldname="*" to your existing search to make sure that you only get the events that have this field. If the events you are searching for always contain the name of the field, in this case network, your query will be more efficient if you also add the field name to the query. In this case, the query would look like this: sourcetype="impl_splunk_gen" network="*" network.
  • Values shows a very useful snapshot of the top ten most common values, Count is the number found for each of these values and % is the percentage that the value is found in this field in the results of the search.
主站蜘蛛池模板: 上饶县| 通辽市| 兴义市| 宜昌市| 福鼎市| 绍兴市| 时尚| 荆州市| 广汉市| 开江县| 长岛县| 台南市| 松滋市| 肃北| 宣威市| 鞍山市| 巴南区| 鹿泉市| 榆树市| 增城市| 和硕县| 三河市| 绥化市| 四会市| 加查县| 库车县| 镶黄旗| 依安县| 灵璧县| 崇礼县| 宁乡县| 万年县| 松江区| 东平县| 湖州市| 婺源县| 霍林郭勒市| 汨罗市| 芜湖县| 新昌县| 江永县|