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!

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 ...