Dashboards & Visualizations

How to separate two different value for the same date

aditsss
Motivator

Hi All,

I am using below query to fetch my records:

index="abc*" sourcetype =600000304_gg_abs_ipc2 source="/amex/app/gfp-settlement-transform/logs/gfp-settlement-transform.log" source="/amex/app/gfp-settlement-transform/logs/gfp-settlement-transform.log" "Server side call completed for Collateral with record count"| rex "Server side call completed for Collateral with record count:\s+(?<record>\d+)"|timechart span=1d values(record) AS RecordCount

I am getting records as below:

Two Records.PNG

How can I separate them .Can someone guide 

Labels (3)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

What do you want the output to look like?

Please re-share the raw events.

---
If this reply helps you, Karma would be appreciated.
0 Karma

aditsss
Motivator

@richgalloway 

raw events:

2023-08-08 10:25:13.067 [INFO ] [Thread-3] CollateralProcessor - Server side call completed for Collateral with record count: 476

2023-08-08 09:56:03.777 [INFO ] [Thread-3] CollateralProcessor - Server side call completed for Collateral with record count: 18541701

I want to fetch both values

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Thanks for sharing the events.

You *are* collecting both values, but you apparently you are unhappy with how the values are presented.  Please describe or provide a mock-up of how you would like the values displayed and we'll try to find a way to accomplish that.

---
If this reply helps you, Karma would be appreciated.
0 Karma

bowesmana
SplunkTrust
SplunkTrust

It looks like you are collecting both those values, but your timechart command

| timechart span=1d values(record) AS RecordCount

is collecting the individual values of those into the RecordCount field giving you multiple values - do you want to add them together or something else?

timechart span=1d sum(record) AS RecordCount

This will add them together 

0 Karma

aditsss
Motivator

@bowesmana 

I want to display both of them like on 08/02/2023 both values should be displayed .

But currently I am not able to make any bar chart for it. As two  values are coming on one date.

Query:

index="abc*" sourcetype =600000304_gg_abs_ipc2 source="/amex/app/gfp-settlement-transform/logs/gfp-settlement-transform.log" source="/amex/app/gfp-settlement-transform/logs/gfp-settlement-transform.log" "Server side call completed for Collateral with record count"| rex "Server side call completed for Collateral with record count:\s+(?<record>\d+)"|timechart span=1d values(record) AS RecordCount

I want them to come individually along with the date.

 

0 Karma

bowesmana
SplunkTrust
SplunkTrust

Are you saying you want 1 column for each record count for each day in your bar chart? If so, you need to provide a series for each of the rows. There is no need to do an aggregation with timechart.

You can do

...
| bin _time span=1d
| table _time RecordCount

which will give you a row per event, but you then need to understand how you want to show this

 

 

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...