Skip to content

Commit e43315d

Browse files
fix: improve SC4S Dashboard performance (#2592)
1 parent 3ee8fa0 commit e43315d

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

dashboard/dashboard.xml

+12-9
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</search>
1919
<search id="baseEventsSearch">
2020
<query>
21-
index=* sc4s_container=$sc4s_instance$
21+
| tstats count where index=* sc4s_container=$sc4s_instance$ by index _time
2222
</query>
2323
<earliest>$time_range.earliest$</earliest>
2424
<latest>$time_range.latest$</latest>
@@ -43,8 +43,8 @@
4343
<input type="time" token="time_range">
4444
<label>Timer</label>
4545
<default>
46-
<earliest>rt-15m</earliest>
47-
<latest>rt</latest>
46+
<earliest>-15m</earliest>
47+
<latest>now</latest>
4848
</default>
4949
</input>
5050
<html>
@@ -220,6 +220,7 @@
220220
<option name="numberPrecision">0</option>
221221
<option name="rangeColors">["0x53a051", "0x0877a6", "0xf8be34", "0xf1813f", "0xdc4e41"]</option>
222222
<option name="rangeValues">[0,30,70,100]</option>
223+
<option name="refresh.display">progressbar</option>
223224
<option name="showSparkline">1</option>
224225
<option name="showTrendIndicator">1</option>
225226
<option name="trellis.enabled">0</option>
@@ -310,14 +311,15 @@
310311
<single>
311312
<title>Total volume of actual syslog traffic delivered by this SC4S instance to Splunk</title>
312313
<search base="baseEventsSearch">
313-
<query>| stats count</query>
314+
<query>| stats sum(count)</query>
314315
</search>
315316
<option name="colorBy">value</option>
316317
<option name="colorMode">none</option>
317318
<option name="drilldown">none</option>
318319
<option name="numberPrecision">0</option>
319320
<option name="rangeColors">["0x53a051", "0x0877a6", "0xf8be34", "0xf1813f", "0xdc4e41"]</option>
320321
<option name="rangeValues">[0,30,70,100]</option>
322+
<option name="refresh.display">progressbar</option>
321323
<option name="showSparkline">1</option>
322324
<option name="showTrendIndicator">1</option>
323325
<option name="trellis.enabled">0</option>
@@ -336,7 +338,7 @@
336338
<title>Distributions of events by index</title>
337339
<chart>
338340
<search base="baseEventsSearch">
339-
<query>| stats count by index</query>
341+
<query>| stats sum(count) as count by index</query>
340342
</search>
341343
<option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
342344
<option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
@@ -366,6 +368,7 @@
366368
<option name="charting.legend.mode">standard</option>
367369
<option name="charting.legend.placement">right</option>
368370
<option name="charting.lineWidth">2</option>
371+
<option name="refresh.display">progressbar</option>
369372
<option name="trellis.enabled">0</option>
370373
<option name="trellis.scales.shared">1</option>
371374
<option name="trellis.size">medium</option>
@@ -375,7 +378,7 @@
375378
<title>Trends of events by index</title>
376379
<table>
377380
<search base="baseEventsSearch">
378-
<query>| chart sparkline(count) AS "Indexes Trend" count AS Total BY index</query>
381+
<query>| stats sparkline(sum(count)) as "Indexes Trend" sum(count) as Total by index</query>
379382
</search>
380383
<option name="count">20</option>
381384
<option name="dataOverlayMode">none</option>
@@ -393,7 +396,7 @@
393396
<chart>
394397
<search>
395398
<query>
396-
index=* sc4s_container=$sc4s_instance$ | eval tags=split(sc4s_tags,"|") | mvexpand tags | search tags=".app.*" | timechart count by tags
399+
| tstats count where index=* sc4s_container=$sc4s_instance$ by sc4s_tags _time | eval tags=split(sc4s_tags,"|") | mvexpand tags | search tags=".app.*" | timechart sum(count) by tags
397400
</query>
398401
<earliest>$time_range.earliest$</earliest>
399402
<latest>$time_range.latest$</latest>
@@ -439,7 +442,7 @@
439442
<table>
440443
<search>
441444
<query>
442-
index=* sc4s_container=$sc4s_instance$ | eval tags=split(sc4s_tags,"|") | mvexpand tags | chart count by tags
445+
| tstats count where index=* sc4s_container=$sc4s_instance$ by sc4s_tags _time | eval tags=split(sc4s_tags,"|") | mvexpand tags | stats sum(count) as eventCount by tags | sort - eventCount
443446
</query>
444447
<earliest>$time_range.earliest$</earliest>
445448
<latest>$time_range.latest$</latest>
@@ -449,4 +452,4 @@
449452
</table>
450453
</panel>
451454
</row>
452-
</form>
455+
</form>

0 commit comments

Comments
 (0)