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

Running a simple search

You are ready to run your first Splunk search:

  1. Click directly on the green Search & Reporting app button. In this example, you use Splunk's very own internal index; this is Splunk's way of splunking itself (or collecting detailed information on all its underlying processes).
An index is the term given to where Splunk stores event data captured from log files, APIs, HTTP events, delimited files, and other machine data sources. It is in some ways like a database, but should not be compared to traditional relational databases in functionality or performance.
  1. In the New Search input, type in the following search query (more about the Search Processing Language (SPL) in Chapter 3, Search Processing Language):
SPL> index=_internal sourcetype=splunkd
The SPL> prefix will be used as a convention in this book to indicate a Splunk Search command . Since SPL is submitted via the Splunk user interface, there is no difference whether operating in Windows or Linux environments. The underscore before the index name _internal means that it is a system index internally used by Splunk. Omitting the underscore will not yield any result, as internal is not a default index.
  1. This search query will have as an output the raw events from the metrics.log file that is stored in the _internal index. A log file keeps track of every event that takes place in the system. The _internal index keeps track of every event that occurs and makes it easily accessible.
  1. Take a look at these raw events, as shown in the following screenshot. You will see fields listed on the left side of the screen. The important Selected Fields are host, source, and sourcetype. We will go into more detail about these later, but suffice to say that you will frequently search on one of these, as we have done here. As you can see from the highlighted fields, we indicated that we were looking for events where sourcetype=splunkd. Underneath Selected Fields, you will see Interesting Fields. As you can tell, the purposes of many of these fields are easy to guess as seen in the following screenshot:
主站蜘蛛池模板: 九龙县| 东方市| 奉节县| 确山县| 辉南县| 资源县| 彝良县| 衢州市| 聂拉木县| 金溪县| 博罗县| 彭州市| 抚远县| 山东省| 景泰县| 惠安县| 娱乐| 沐川县| 城口县| 额尔古纳市| 富裕县| 荥经县| 滁州市| 浑源县| 石阡县| 奉化市| 集贤县| 小金县| 精河县| 闻喜县| 宜良县| 万载县| 巩留县| 大安市| 洛川县| 南和县| 栾川县| 富阳市| 门头沟区| 黑龙江省| 富阳市|