"A timechart is a statistical aggregation applied to a field to produce a chart, with time used as the X-axis" Thus, ANS is Time src: https://docs.splunk.com/Documentation/Splunk/8.0.4/SearchReference/Timechart Show
upvoted 2 times is _time upvoted 5 times Splunk docs (link above) clearly states "...with time used as the X-axis." However, if you run "| timechart count", the field defaults to "_time". Thus, the visualization tab displays the "_time" on the X-axis. So this seems to be the case where the question/answer is referring to the documentation. upvoted 1 times ... ...
ctux1 year, 10 months ago if you look at any figure in the link you reported above where a timechart is represented, you can see that the indicated field is _time upvoted 4 times ... ... What is Splunk Timechart?The Splunk timechart command generates a table of summary statistics. This table can then be formatted as a chart visualization, where your data is plotted against an x-axis that is always a time field. Use the timechart command to display statistical trends over time You can split the data with another field as a separate series in the chart. Time chart visualizations are usually line, area, or column charts. Use the Syntax: timechart [sep=<string>] [partial=<bool>] [cont=<t|f>] [limit=<int>] [agg=<stats-agg-term>] [<bucketing-option> ]* (<single-agg> [by <split-by-clause>] ) | ( (<eval-expression>) by <split-by-clause> ) Required argumentsWhen specifying timechart arguments, either <single-agg> or <eval-expression> BY <split-by-clause> is required. split-by-clause Syntax: <field> (<tc-option>)* [<where-clause>] Description: Specifies a field to split by. If field is numerical, default discretization is applied; discretization is defined with tc-option. single-agg Syntax: count|<stats-func>(<field>) Description: A single aggregation applied to a single field (can be evaled field). No wildcards are allowed. The field must be specified, except when using the special 'count' aggregator that applies to events as a whole. eval-expression Syntax: <math-exp> | <concat-exp> | <compare-exp> | bool-exp> | <function-call> Description: A combination of literals, fields, operators, and functions that represent the value of your destination field. The following are the basic operations you can perform with eval. For these evaluations to work, your values need to be valid for the type of operation. For example, with the exception of addition, arithmetic operations may not produce valid results if the values are not numerical. Additionally, Splunk can concatenate the two operands if they are both strings. When concatenating values with '.', Splunk treats both values as strings regardless of their actual type. agg Syntax: <stats-agg-term> Description: See the Stats functions section below. For a list of stats functions with descriptions and examples, see"Functions for stats, chart, and timechart". Accelerate Your Career With Splunk Training and become expertise Splunk Developer. bucketing option Syntax: bins | minspan | span | <start-end> Description: Discretization options. If a bucketing option is not supplied, agg=<stats-agg-term> Syntax: <stats-agg-term> Description: See the Stats functions section below. For a list of stats functions with descriptions and examples, seeStatistical and charting functions in this manual. bin-options Syntax: bins | minspan | span | <start-end> Description: Options that you can use to specify discreet bins, or groups, to organize the information. The fixedrange Syntax: fixedrange=<bool> Description: (Not valid for 4.2) Specify whether or not to enforce the earliest and latest times of the search. Setting fixedrange=false allows the timechart command to constrict to just the time range with valid data.Default: true format Syntax: format=<string> Description: Used to construct output field names when multiple
data series are used in conjunction with a split-by-field. limit Syntax: limit=<int> Description: Specifies a limit for the number of distinct values of the split-by field to return. If set to limit=0, all distinct values are used.
Setting limit=N keeps the N highest scoring distinct values of the -The scoring is determined as follows:
partial Syntax: partial=<bool> Description: Controls if partial time bins should be retained or not. Only the first and last bin can be partial. Default: True. Partial time bins are retained. sep Syntax: sep=<string> Description: Used to construct output field names when multiple data series are used in conjunctions with a split-by field. This is equivalent to setting Stats options stats-agg-term Syntax: <stats-func> ( <evaled-field> | <wc-field> ) [AS <wc-field>] Description: A statistical aggregation function. Use the AS clause to place the result into a new field with a name that you specify. The function can be applied to an eval expression, or to a field or set of fields. You can use wild card characters in field names. stats-function Syntax: avg() | c() | count() | dc() | distinct_count() | earliest() | estdc() | estdc_error() | exactperc<int>() | first() | last() | latest() | list() | max() | median() | min() | mode() | p<in>() | perc<int>() | per_day() | per_hour() | per_minute() | per_second() |range() | stdev() | stdevp() | sum() | sumsq() | upperperc<int>() | values() | var() | varp() Description: Functions you can use with the Bin optionsbinsSyntax: bins=<int>Description: Sets the maximum number of bins to discretize into. This does not set the target number of bins. It finds the smallest bin size that results in no more than N distinct bins. Even though you specify a number such as 300, the resulting number of bins might be much lower.Default: 100minspanSyntax: minspan=<span-length>Description: Specifies the smallest span granularity to use automatically inferring span from the data time range.spanSyntax: span=<log-span> | span=<span-length>Description: Sets the size of each bin, using a span length based on time or log-based span.<start-end> Syntax: end=<num> | start=<num> Description:Sets the minimum and maximum extents for numerical bins. Data outside of the [start, end] range is discarded. Span options <log-span> Syntax: [<num>]log[<num>] Description: Sets to log-based span. The first number is a coefficient. The second number is the base. If the first number is supplied, it must be a real number >= 1.0 and < base. Base, if supplied, must be real number > 1.0 (strictly greater than 1). span-length Syntax: <int>[<timescale>] Description: A span of each bin, based on time. If the timescale is provided, this is used as a time range. If not, this is an absolute bin length. <timescale> Syntax: <sec> | <min> | <hr> | <day> | <week> | <month> | <subseconds> Description: Time scale units.
tc optionsThe <tc-option> is part of the <split-by-clause>. tc-optionSyntax: <bin-options> | usenull=<bool> | useother=<bool> | nullstr=<string> | otherstr=<string>Description: Options for controlling the behavior of splitting by a field.bin-optionsSee the Bin options section in this topic.nullstrSyntax: nullstr=<string>Description: If usenull is true, this series is labeled by the value of the nullstr option.Default: NULLotherstrSyntax: otherstr=<string>Description: If useother is True, this series is labeled by the value of the otherstr option. Default: OTHERusenullSyntax: usenull=<bool> Description: Controls whether or not a series is created for events that do not contain the split-by field. useother Syntax: useother=<bool> Description: Specifies if a series should be added for data series not included in the graph because they did not meet the criteria of the <where-clause>. Default: True where clauseThe <where-clause> is part of the <split-by-clause>. where clauseSyntax: <single-agg> <where-comp>Description: Specifies the criteria for including particular data series when a field is given in the tc-by-clause. The most common use of this option is to select for spikes rather than overall mass of distribution in series selection. The default value finds the top ten series by area under the curve. Alternately one could replace sum with max to find the series with the ten highest spikes.This has no relation to the where command.<where-comp>Syntax: <wherein-comp> | <wherethresh-comp>Description: A criteria for the where clause.<wherein-comp>Syntax: (in | notin) (top | bottom)<int>Description: A where-clause criteria that requires the aggregated series value be in or not in some top or bottom grouping.<wherethresh-comp>Syntax: (< | >)( )?<num>Description: A where-clause criteria that requires the aggregated series value be greater than or less than some numeric threshold.Usagebins and span argumentsThe timechart command accepts either the Default time spansIt you use the predefined time ranges in the time range picker, and do not specify the
For an Indepth knowledge on Splunk, click on below
When using the Timechart command which axis represents time Splunk?Note: There are other options you can specify with the timechart command, which we'll explore in a separate blog. So how do these results appear in a chart? On the Visualization tab, you see that _time forms the X-axis. The axis marks the Midnight and Noon values for each date.
Which argument can be used with the Timechart command to specify the time range to use when grouping events?Some commands include an argument where you can specify a time span, which is used to organize the search results by time increments. The GROUP BY clause in the from command, and the bin , stats , and timechart commands include a span argument.
Which argument can be used with Geostats command to control the column count?Unlike the stats command, the geostats command only accepts one by argument. To control the column count, a global limit argument can be used.
Which command changes the appearance of field values?The fieldformat command can be used if you want to format the appearance of values without making a change to the underlying raw data.
|