Dashboards & Visualizations

Day field is messed up in graph ??

rakesh_498115
Motivator

Hi .

i have plotted the line graph using the following query .

| inputlookup statsdata.csv | eval _time=strptime(Day,"%d-%B-%y") | fields _time,AvgBest95,Mean95,UCL95,LCL95

when i use this the _time field is not displaying on the x-axis..

Wat could be the problem ? if all the dates are not displayed can we intermediate dates atlest ..
i.e i have records for the past three months in my statsdata file..so for all these records can i have the intermediate dates displayed on the x-axis, cause it looks awkward with no data displayed on x-axis..

Please help..

thanx

Tags (2)
0 Karma

jonuwz
Influencer

You need to use timechart.

This emulates your data :

| gentimes start=-150 | eval date=strftime(starttime,"%d-%B-%y") | streamstats count as AvgBest95 | search (AvgBest95!=*7) | table date AvgBest95

there's a date missing if AvgBest95 contains a 7

adding this :

| eval _time=strptime(date,"%d-%B-%y") | timechart span=1d avg(AvgBest95)

charts your data with dates on the X axis

0 Karma
Get Updates on the Splunk Community!

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...

[Live Demo] Watch SOC transformation in action with the reimagined Splunk Enterprise ...

Overwhelmed SOC? Splunk ES Has Your Back Tool sprawl, alert fatigue, and endless context switching are making ...

What’s New & Next in Splunk SOAR

Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us on ...