@@ -981,80 +981,41 @@ local utils = commonlib.utils;
981981 segmentSizePanel:
982982 g.panel.timeSeries.new('Segment size' )
983983 + g.panel.timeSeries.panelOptions.withDescription('Memory used by segments for the selected index.' )
984- + g.panel.timeSeries.queryOptions.withTargets([signals.indexing.segments_memory_bytes.asTarget()])
984+ + g.panel.timeSeries.queryOptions.withTargets([
985+ signals.indexing.segments_memory_bytes.asTarget()
986+ + g.query.prometheus.withIntervalFactor(2 ),
987+ ])
985988 + g.panel.timeSeries.standardOptions.withUnit('bytes' )
986- + g.panel.timeSeries.standardOptions.color.withMode('palette-classic' )
987- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisCenteredZero(false )
988- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisColorMode('text' )
989- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisLabel('' )
990- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisPlacement('auto' )
991- + g.panel.timeSeries.fieldConfig.defaults.custom.withBarAlignment(0 )
992- + g.panel.timeSeries.fieldConfig.defaults.custom.withDrawStyle('line' )
993- + g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(0 )
994- + g.panel.timeSeries.fieldConfig.defaults.custom.withGradientMode('none' )
995- + g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('linear' )
996- + g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(1 )
997- + g.panel.timeSeries.fieldConfig.defaults.custom.withPointSize(5 )
998- + g.panel.timeSeries.fieldConfig.defaults.custom.withScaleDistribution({ type: 'linear' })
999- + g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('auto' )
1000- + g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false )
1001- + g.panel.timeSeries.fieldConfig.defaults.custom.withStacking({ group: 'A' , mode: 'none' })
1002- + g.panel.timeSeries.fieldConfig.defaults.custom.withThresholdsStyle({ mode: 'off' })
1003989 + g.panel.timeSeries.standardOptions.thresholds.withSteps([
1004990 g.panel.timeSeries.standardOptions.threshold.step.withColor('green' )
1005991 + g.panel.timeSeries.standardOptions.threshold.step.withValue(null ),
1006992 g.panel.timeSeries.standardOptions.threshold.step.withColor('red' )
1007993 + g.panel.timeSeries.standardOptions.threshold.step.withValue(80 ),
1008994 ])
1009- + g.panel.timeSeries.options.withLegend({
1010- calcs: [],
1011- displayMode: 'list' ,
1012- placement: 'bottom' ,
1013- showLegend: true ,
1014- })
1015- + g.panel.timeSeries.options.withTooltip({
1016- mode: 'single' ,
1017- sort: 'none' ,
1018- }),
995+ + g.panel.timeSeries.standardOptions.withOverrides([
996+ g.panel.timeSeries.fieldOverride.byValue.new({op: 'gte' , reducer: 'allIsZero' , value: 0 })
997+ + g.panel.timeSeries.fieldOverride.byValue.withProperty('custom.hideFrom' , {legend: true , tooltip: true , viz: false }),
998+ ]),
1019999
10201000 mergeSizePanel:
10211001 g.panel.timeSeries.new('Merge size' )
10221002 + g.panel.timeSeries.panelOptions.withDescription('Size of merge operations in bytes for the selected index.' )
1023- + g.panel.timeSeries.queryOptions.withTargets([signals.indexing.merge_current_size.asTarget()])
1003+ + g.panel.timeSeries.queryOptions.withTargets([
1004+ signals.indexing.merge_current_size.asTarget()
1005+ + g.query.prometheus.withIntervalFactor(2 ),
1006+ ])
10241007 + g.panel.timeSeries.standardOptions.withUnit('bytes' )
1025- + g.panel.timeSeries.standardOptions.color.withMode('palette-classic' )
1026- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisCenteredZero(false )
1027- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisColorMode('text' )
1028- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisLabel('' )
1029- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisPlacement('auto' )
1030- + g.panel.timeSeries.fieldConfig.defaults.custom.withBarAlignment(0 )
10311008 + g.panel.timeSeries.fieldConfig.defaults.custom.withDrawStyle('points' )
1032- + g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(0 )
1033- + g.panel.timeSeries.fieldConfig.defaults.custom.withGradientMode('none' )
1034- + g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('linear' )
1035- + g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(1 )
1036- + g.panel.timeSeries.fieldConfig.defaults.custom.withPointSize(5 )
1037- + g.panel.timeSeries.fieldConfig.defaults.custom.withScaleDistribution({ type: 'linear' })
1038- + g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('auto' )
1039- + g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false )
1040- + g.panel.timeSeries.fieldConfig.defaults.custom.withStacking({ group: 'A' , mode: 'none' })
1041- + g.panel.timeSeries.fieldConfig.defaults.custom.withThresholdsStyle({ mode: 'off' })
10421009 + g.panel.timeSeries.standardOptions.thresholds.withSteps([
10431010 g.panel.timeSeries.standardOptions.threshold.step.withColor('green' )
10441011 + g.panel.timeSeries.standardOptions.threshold.step.withValue(null ),
10451012 g.panel.timeSeries.standardOptions.threshold.step.withColor('red' )
10461013 + g.panel.timeSeries.standardOptions.threshold.step.withValue(80 ),
10471014 ])
1048- + g.panel.timeSeries.options.withLegend({
1049- calcs: [],
1050- displayMode: 'list' ,
1051- placement: 'bottom' ,
1052- showLegend: true ,
1053- })
1054- + g.panel.timeSeries.options.withTooltip({
1055- mode: 'single' ,
1056- sort: 'none' ,
1057- }),
1015+ + g.panel.timeSeries.standardOptions.withOverrides([
1016+ g.panel.timeSeries.fieldOverride.byValue.new({op: 'gte' , reducer: 'allIsZero' , value: 0 })
1017+ + g.panel.timeSeries.fieldOverride.byValue.withProperty('custom.hideFrom' , {legend: true , tooltip: true , viz: false }),
1018+ ]),
10581019
10591020 searchAndIndexShardCountPanel:
10601021 g.panel.timeSeries.new('Shard count' )
0 commit comments