![]() We continue the previous example but instead of average, we now use the max(), min() and range function together in the stats command so that we can see how the range has been calculated by taking the difference between the values of max and min columns. The stats command can be used to display the range of the values of a numeric field by using the range function. In the below example, we find the average byte size of the files grouped by the various http status code linked to the events associated with those files. ![]() But with a by clause, it will give multiple rows depending on how the field is grouped by the additional new field. Without a BY clause, it will give a single record which shows the average value of the field for all the events. This function takes the field name as input. We can find the average value of a numeric field by using the avg() function. If a BY clause is used, one row is returned for each distinct value specified in the BY clause.īelow we see the examples on some frequently used stats command. If the stats command is used without a BY clause, only one row is returned, which is the aggregation over the entire incoming result set. The stats command works on the search results as a whole and returns only the fields that you specify.Įach time you invoke the stats command, you can use one or more functions. The stats command is used to calculate summary statistics on the results of a search or the events retrieved from an index.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |