Dashboards & Visualizations

Moving Average Overlay on stacked column

darkins
Engager

i have this on other panels but cant get it on a stacked column chart

 

| streamstats current=f last(Timestamp) as HaltedCycleLastTime by Cycle
| eval HaltedCycleSecondsHalted=round(HaltedCycleLastTime - Timestamp,0)
| eval HaltedCycleSecondsHalted=if(HaltedCycleSecondsHalted < 20,HaltedCycleSecondsHalted,0) | streamstats time_window=30d sum(HaltedCycleSecondsHalted) as HaltedCycleSecondsPerDayMA
| eval HaltedCycleSecondsPerDayMA=round(HaltedCycleSecondsPerDayMA,0)
| chart sum(HaltedCycleSecondsHalted) as HaltedSecondsPerDayPerCycle by CycleDate Cycle limit=0

this produces a stacked column based on the chart command , but in dashboard studio i expect to see HaltedCycleSecondsPerDayMA as a pickable field and i dont. I added to code as overlayfields but still not showing.

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

HaltedCycleSecondsPerDayMA is not included in the chart command which is why it is removed from the event fields. What were you expecting to be there? How was it supposed to have been calculated (by the chart command)?

0 Karma

darkins
Engager

HaltedCyclesPerDayMA is computed in the eval line above

as shown the query gives me a stacked column chart (stacked by cycle), i want the HaltedCyclesPerDayMA as a line overlay (showing the moving average on top of the raw data

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

But it is not included in the chart command so it isn't in your results and therefore not available to be shown as an overlay. You may need to find a way to calculate the value after the chart command.

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...