Splunk Search

Charting Assistance

yepyepyayyooo
New Member

I'm having an issue with a visualization. Works fine if I don't try to do the fancy eval but won't plot out in visualization when I do.

index="bro" sourcetype="bro_conn" dest_ipi_zone="INT" dest_ipi_zone="INT" TERM(1.1.1.1) bytes>=50000
| eval bytes+=case( 
    bytes>=(1024*1024*1024*1024),round(bytes/(1024*1024*1024*1024),0)." TB",
    bytes>=(1024*1024*1024),round(bytes/(1024*1024*1024),0)." GB",
    bytes>=(1024*1024),round(bytes/(1024*1024),0)." MB",
    bytes>=1024,round(bytes/1024,0)." KB",
    1=1,bytes." B")
| lookup dnslookup clientip as dest_ip output clienthost as dest_dns
| eval time=strftime(_time,"%Y/%m/%d %H:%M")
| bucket time span=4h 
| chart values(bytes+) by time dest_dns usenull=f useother=f limit=5
Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

By "fancy eval" do you mean the eval that creates the 'bytes+' field? If so, have you tried using a field name without '+' in it?

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

yepyepyayyooo
New Member

Yes, that's just the name of the new field. I named it bytess, bytes1, etc. Doesn't make a difference :'(

0 Karma

richgalloway
SplunkTrust
SplunkTrust

So what is the query that works?

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

yepyepyayyooo
New Member

I don't know, that's what I'm asking Splunk Answers for.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

"Works fine if I don't try to do the fancy eval ". Please share the part that works fine.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...