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!

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...