Knowledge Management

sitimechart

SaharElmakias
Engager

Hello,

While using sitimechart instead of timechart - The data has been changed.
I would like to calculate an error percentage but the system shows 0 or fields count.

Thanks!

SaharElmakias_0-1713080724502.png

SaharElmakias_1-1713080742482.png

 

 

Labels (2)
Tags (1)
0 Karma
1 Solution

marnall
Builder


If you would just like to make a timechart, then the timechart command should fit your need better than the sitimechart command. The sitimechart is intended for preparing the data to insert into a summary index so that later on it can be timecharted from the summary index.

Using just timechart:

 

<your search>
| timechart span=1d avg(errorPercentage) as errorPercentage by Process

 

If you would like to gather data now into a summary index to produce a timechart very quickly in a later search, you can use sitimechart:

 

<your search>
| sitimechart span=1d avg(errorPercentage) as errorPercentage by Process
| collect index=yoursummaryindex

 

Then in a later search:

 

index = yoursummaryindex <some filter, e.g. for Process=*>
| timechart span=1d avg(errorPercentage) as errorPercentage by Process

 

The docs page describes the sitimechart usage, but does not explain the meaning of the created fields: https://docs.splunk.com/Documentation/Splunk/9.2.0/SearchReference/Sitimechart

View solution in original post

0 Karma

marnall
Builder


If you would just like to make a timechart, then the timechart command should fit your need better than the sitimechart command. The sitimechart is intended for preparing the data to insert into a summary index so that later on it can be timecharted from the summary index.

Using just timechart:

 

<your search>
| timechart span=1d avg(errorPercentage) as errorPercentage by Process

 

If you would like to gather data now into a summary index to produce a timechart very quickly in a later search, you can use sitimechart:

 

<your search>
| sitimechart span=1d avg(errorPercentage) as errorPercentage by Process
| collect index=yoursummaryindex

 

Then in a later search:

 

index = yoursummaryindex <some filter, e.g. for Process=*>
| timechart span=1d avg(errorPercentage) as errorPercentage by Process

 

The docs page describes the sitimechart usage, but does not explain the meaning of the created fields: https://docs.splunk.com/Documentation/Splunk/9.2.0/SearchReference/Sitimechart

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...