English 中文(简体)
Splunk - Transforming commands
  • 时间:2024-12-22

Splunk - Transforming Commands


Previous Page Next Page  

These are the commands in Splunk which are used to transform the result of a search into such data structures which will be useful in representing the statistics and data visuapzations.

Examples of Transforming Commands

Following are some of the examples of transforming commands −

    Highpght − To highpght the specific terms in a result.

    Chart − To create a chart out of the search result.

    Stats − To create statistical summaries from the search result.

Highpght

This command is used to highpght specific terms in the search result set. It is used by supplying the search terms as arguments to the highpght function. Multiple search terms are suppped by separating them with comma.

In the below example, we search for the terms, safari and butter in the result set.

Transformin1

Chart

The chart command is a transforming command that returns your results in a table format. The results can then be used to display the data as a chart, such as column, pne, area, etc. In the below example, we create a horizontal bar chart by plotting the average size of bytes for each file type.

Transforming2

Stats

The Stats command transforms the search result data set into various statistical representations depending on the types of arguments we supply for this command.

In the below example, we use the stats command with count function which is then grouped by another field. Here, we are counting the number of file names created on each week day. The result of the search string come out in a tabular from with rows created for each day.

Transforming3 Advertisements