Splunk Search

Create a triple stacked bar chart that has one column per day

SimonR2018
New Member

Hello All,

I am having difficulty in creating a triple stacked bar chart that has is displayed per day for time series

I have 3 fields in accountDetails.channel consisting of 'iPhone, web, android' i.e
ANDROID 63
IPHONE 232
WEB 45

and what I want is to create a single column with each of these fields and values per day and then create a time series for the columns values for the previous X days

spath event | search event="account:create:account:success"|dedup accountDetails.accountId | bin _time span=1d as day | convert timeformat="%Y-%m-%d" ctime(day) AS MYDay | chart count AS MYDAY by accountDetails.channel

unfortunately while i can create a single bar with the total number of accounts created I can not stack the bar per X days

Tags (1)
0 Karma
1 Solution

renjith_nair
Legend

@SimonR2018,

Try

spath event | search event="account:create:account:success"|dedup accountDetails.accountId 
| bin _time span=1d as day | convert timeformat="%Y-%m-%d" ctime(day) AS MYDay 
| chart count  over MYDay by accountDetails.channel
Happy Splunking!

View solution in original post

0 Karma

renjith_nair
Legend

@SimonR2018,

Try

spath event | search event="account:create:account:success"|dedup accountDetails.accountId 
| bin _time span=1d as day | convert timeformat="%Y-%m-%d" ctime(day) AS MYDay 
| chart count  over MYDay by accountDetails.channel
Happy Splunking!
0 Karma

SimonR2018
New Member

Thank you very much, working as requested

0 Karma
Get Updates on the Splunk Community!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...