Splunk Search

Why does chart remove the empty x-values made with |makecontinuous?

HrCivilingeniør
New Member

I want to make an evenly spaced x-axis in a dataset with gaps in it and then use chart to make a trellis view based on the variable "testsubject"

I use |makecontinuous to pad a data set with empty x-values to get the distance between the existing data points right in a chart.

The search looks like this:

| tstats avg(ReadCVM1) as ReadCVM1 avg(ReadCVM2) as ReadCVM2 avg(ReadCVM3) as ReadCVM3 avg(ReadCVM4) as ReadCVM4 avg(ReadCVM5) as ReadCVM5 avg(ReadCVM6) as ReadCVM6 avg(ReadCVM7) as ReadCVM7 avg(ReadCVM8) as ReadCVM8 avg(ReadCVM9) as ReadCVM9 avg(ReadCVM10) as ReadCVM10 avg(ReadStackPot) as ReadStackPot avg(ReadCoolTempOut) as ReadCoolTempOut latest(RunPolCurve) as RunPolCurve where index=test_station_log_data AND (testsubject IN (P1211,P1213)) by ReadCurrent testsubject
|where RunPolCurve=1
|eval RoundCurrent = round(ReadCurrent)
|sort testsubject ReadCurrent
|eval RoundCurrent = round(ReadCurrent)
|makecontinuous RoundCurrent span=1
|filldown testsubject
|chart avg(ReadCVM1) as ReadCVM1 avg(ReadCVM2) as ReadCVM2 avg(ReadCVM3) as ReadCVM3 avg(ReadCVM4) as ReadCVM4 avg(ReadCVM5) as ReadCVM5 avg(ReadCVM6) as ReadCVM6 avg(ReadCVM7) as ReadCVM7 avg(ReadCVM8) as ReadCVM8 avg(ReadCVM9) as ReadCVM9 avg(ReadCVM10) as ReadCVM10 by RoundCurrent testsubject

If I remove the chart command, gaps in RoundCurrent has been filled like I want. See below:

HrCivilingenir_0-1682674532832.png

After I run the |chart command, the padded regions have been removed again.Can I prevent this from happening?

HrCivilingenir_1-1682675018188.png

 

I found out that I can get them back by running |makecontinuous after the |chart command, but then I loose the ability to make a trellis view split by "testsubject". I need this to present it properly in a dashboard.

Any help would be greatly appreciated.

 

Labels (1)
Tags (1)
0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...