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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...