logo
logo
Sign in

Splunk Timechart | Timechart Command In Splunk With Example

avatar
company

What is a Splunk Timechart?

The usage of splunk timechart command is specifically to generate the summary statistics table. This table that is generated out of the command execution, can then be formatted in the manner that is well suited for the requirement – chart visualization for example. The charts when we try to visualize, the data obtained is plotted against time (that is limited to the X-axis by default) and then the parameter that you choose for the Y-axis. The timechart is a statistical aggregation of a specific field with time on X-axis. Hence the chart visualizations that you may end up with are always line charts, area charts or column charts.


Please take a closer look at the syntax of timechart command that is provided by the Splunk software itself:

timechart [sep=] [format=] [partial=] [cont=] [limit=] [agg=] [... ] ( ( [BY ] ) | () BY )


Let us now take a look at the required arguments that you specifically need to pass on to the command without which you might not be able to fetch the details that you intend to. To use either or , is mandatorily required to be provided. Let us take a closer look at each and every possible required argument to the command.

  • eval-expression

Syntax: | | | |

This can be best described as a combination of literals, fields, operators, and functions that may represent the value of your destination field. For any of these evaluations to evaluate as per your requirement, the values are specifically needed to be valid for the kind of operation that we are going to perform on them. To explain this, if you are trying to perform addition or multiplication of two variables where the inputs to these are not numeric in nature, this will not provide the result that you expect to be evaluated.

  • single-agg


Syntax: count | ()


This can be best described as a single aggregation that can be applied to a specific field, including an evaluated field. There is no possibility for wildcards to be used. The field must be specified always but as an exception, when using the count aggregator this can be optionally left over.

  • split-by-clause


Syntax: ()... []


This specifies a field to be split. If the provided field is a numerical field, then the default discretization is applied to it (which is defined by the tc-options). You can optionally use the to specify the required number of columns to be included.

There are a varied range of optional parameters that can be used with timechart command, but we will not be going through each and every one of them to save time. Let us take a look at some of the important but optional parameters in the examples section, so that we can understand the usage of these parameters if not they can be safely skipped.


More info, Splunk timechart


collect
0
avatar
company
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more