Splunk Search

Trellis multi value by date

indeed_2000
Motivator

Hi
I want to create chart that compare single values daily.
for example want to compare (about 30 different product codes) that exist in my log (today vs yesterday), and visualize it with Trellis where as show compare each code on separate chart (for today and yesterday)

expected chart (separate by product code=100 and product code=200 😞
alt text

I write SPL like this:

index="myindex"  | timechart count by code span=1h | timewrap d

but it combine them and show count of all product code in same chart and separate it by date!
any recommendation?

Thanks

0 Karma

to4kawa
Ultra Champion

![alt text][1]

0 Karma

indeed_2000
Motivator

yes it's not difficult but I want to use it for other fields too that some of them might be increase up to 100 different items!

like this: product code=30, product id=100, product tag=80, and so on ...

I need to find a way splunk automatically create this chart because when new field add automatically add to this dashboard

0 Karma

to4kawa
Ultra Champion

Do you want to look a hundred items?

see @rich7177 answer
https://answers.splunk.com/answers/529004/is-there-a-way-to-display-more-than-20-charts-at-a.html
and try another way.

0 Karma

indeed_2000
Motivator

Actually my problem is this how can i generate them automatically not limitation number of chart on a single page!

Let me declare Imagine i have 10 chart, now problem is how can i create them automatically without create manually!

0 Karma

to4kawa
Ultra Champion

I see , I'm sorry to waste your time.

0 Karma

indeed_2000
Motivator

No no I don’t mean you waste my time 🙂
BTW thank you for your answer.

0 Karma

to4kawa
Ultra Champion

![alt text][1]

0 Karma

indeed_2000
Motivator

as I mention overlay chart not separate chart for today and yesterday, need to both of them in single chart for each code.

0 Karma

to4kawa
Ultra Champion

![edited]

0 Karma

indeed_2000
Motivator

it create several empty chart and separate them each 30 minutes!

0 Karma

to4kawa
Ultra Champion

default Splunk can't display Trellis what you want.
make dashboard , use base search and display two chart.

0 Karma

indeed_2000
Motivator

two chart? as I mention about 30 product codes, means 30 chart and might be increase depend on data that's why i use Tellis.

0 Karma

@indeed_2000 try making use of Splunk's internal fields date_mday and date_hour. Following is a run anywhere example based on Splunk's _internal index.

index=_internal sourcetype=splunkd earliest=-1d@d latest=now component IN ("UIAuth","WatchedFile","Metrics","PeriodicHealthReporter","LMStackManager")
| eval date_hour=printf("%02d",date_hour)
| stats count by date_hour date_mday component
| eval date_mday=if(date_mday!=strftime(now(),"%Y/%m/%d"),"Yesterday","Today")

In your case try the following and confirm!

  index="myindex"
| eval date_hour=printf("%02d",date_hour)
| stats count by date_hour date_mday code
| eval date_mday=if(date_mday!=strftime(now(),"%Y/%m/%d"),"Yesterday","Today")
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

indeed_2000
Motivator

i try both, but neither of them create chart like what i describe in post.
need overlay chart for compare yesterday and today for each code in Trellis.

0 Karma
Get Updates on the Splunk Community!

Register to Attend BSides SPL 2022 - It's all Happening October 18!

Join like-minded individuals for technical sessions on everything Splunk!  This is a community-led and run ...

What's New in Splunk Cloud Platform 9.0.2208?!

Howdy!  We are happy to share the newest updates in Splunk Cloud Platform 9.0.2208! Analysts can benefit ...

Admin Console: A Single, Unified Interface for All Your Cloud Admin Needs

WATCH NOWJoin us to learn how the admin console can save you time and give you more control over the Splunk® ...