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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...