@@ -900,41 +900,21 @@ local utils = commonlib.utils;
900900 segmentCountPanel:
901901 g.panel.timeSeries.new('Segment count' )
902902 + g.panel.timeSeries.panelOptions.withDescription('Current number of segments for the selected index.' )
903- + g.panel.timeSeries.queryOptions.withTargets([signals.indexing.segments_number.asTarget()])
903+ + g.panel.timeSeries.queryOptions.withTargets([
904+ signals.indexing.segments_number.asTarget()
905+ + g.query.prometheus.withIntervalFactor(2 ),
906+ ])
904907 + g.panel.timeSeries.standardOptions.withUnit('segments' )
905- + g.panel.timeSeries.standardOptions.color.withMode('palette-classic' )
906- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisCenteredZero(false )
907- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisColorMode('text' )
908- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisLabel('' )
909- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisPlacement('auto' )
910- + g.panel.timeSeries.fieldConfig.defaults.custom.withBarAlignment(0 )
911- + g.panel.timeSeries.fieldConfig.defaults.custom.withDrawStyle('line' )
912- + g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(0 )
913- + g.panel.timeSeries.fieldConfig.defaults.custom.withGradientMode('none' )
914- + g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('linear' )
915- + g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(1 )
916- + g.panel.timeSeries.fieldConfig.defaults.custom.withPointSize(5 )
917- + g.panel.timeSeries.fieldConfig.defaults.custom.withScaleDistribution({ type: 'linear' })
918- + g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('auto' )
919- + g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false )
920- + g.panel.timeSeries.fieldConfig.defaults.custom.withStacking({ group: 'A' , mode: 'none' })
921- + g.panel.timeSeries.fieldConfig.defaults.custom.withThresholdsStyle({ mode: 'off' })
922908 + g.panel.timeSeries.standardOptions.thresholds.withSteps([
923909 g.panel.timeSeries.standardOptions.threshold.step.withColor('green' )
924910 + g.panel.timeSeries.standardOptions.threshold.step.withValue(null ),
925911 g.panel.timeSeries.standardOptions.threshold.step.withColor('red' )
926912 + g.panel.timeSeries.standardOptions.threshold.step.withValue(80 ),
927913 ])
928- + g.panel.timeSeries.options.withLegend({
929- calcs: [],
930- displayMode: 'list' ,
931- placement: 'bottom' ,
932- showLegend: true ,
933- })
934- + g.panel.timeSeries.options.withTooltip({
935- mode: 'single' ,
936- sort: 'none' ,
937- }),
914+ + g.panel.timeSeries.standardOptions.withOverrides([
915+ g.panel.timeSeries.fieldOverride.byValue.new({op: 'gte' , reducer: 'allIsZero' , value: 0 })
916+ + g.panel.timeSeries.fieldOverride.byValue.withProperty('custom.hideFrom' , {legend: true , tooltip: true , viz: false }),
917+ ]),
938918
939919 mergeCountPanel:
940920 g.panel.timeSeries.new('Merge count' )
@@ -961,43 +941,23 @@ local utils = commonlib.utils;
961941 g.panel.timeSeries.new('Cache size' )
962942 + g.panel.timeSeries.panelOptions.withDescription('Size of query cache and request cache.' )
963943 + g.panel.timeSeries.queryOptions.withTargets([
964- signals.search.query_cache_memory.asTarget(),
965- signals.search.request_cache_memory.asTarget(),
944+ signals.search.query_cache_memory.asTarget()
945+ + g.query.prometheus.withIntervalFactor(2 ),
946+ signals.search.request_cache_memory.asTarget()
947+ + g.query.prometheus.withIntervalFactor(2 ),
966948 ])
967949 + g.panel.timeSeries.standardOptions.withUnit('bytes' )
968- + g.panel.timeSeries.standardOptions.color.withMode('palette-classic' )
969- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisCenteredZero(false )
970- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisColorMode('text' )
971- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisLabel('' )
972- + g.panel.timeSeries.fieldConfig.defaults.custom.withAxisPlacement('auto' )
973- + g.panel.timeSeries.fieldConfig.defaults.custom.withBarAlignment(0 )
974- + g.panel.timeSeries.fieldConfig.defaults.custom.withDrawStyle('line' )
975- + g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(0 )
976- + g.panel.timeSeries.fieldConfig.defaults.custom.withGradientMode('none' )
977- + g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('linear' )
978- + g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(1 )
979- + g.panel.timeSeries.fieldConfig.defaults.custom.withPointSize(5 )
980- + g.panel.timeSeries.fieldConfig.defaults.custom.withScaleDistribution({ type: 'linear' })
981- + g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('auto' )
982- + g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false )
983- + g.panel.timeSeries.fieldConfig.defaults.custom.withStacking({ group: 'A' , mode: 'none' })
984- + g.panel.timeSeries.fieldConfig.defaults.custom.withThresholdsStyle({ mode: 'off' })
985950 + g.panel.timeSeries.standardOptions.thresholds.withSteps([
986951 g.panel.timeSeries.standardOptions.threshold.step.withColor('green' )
987952 + g.panel.timeSeries.standardOptions.threshold.step.withValue(null ),
988953 g.panel.timeSeries.standardOptions.threshold.step.withColor('red' )
989954 + g.panel.timeSeries.standardOptions.threshold.step.withValue(80 ),
990955 ])
991- + g.panel.timeSeries.options.withLegend({
992- calcs: [],
993- displayMode: 'list' ,
994- placement: 'bottom' ,
995- showLegend: true ,
996- })
997- + g.panel.timeSeries.options.withTooltip({
998- mode: 'multi' ,
999- sort: 'none' ,
1000- }),
956+ + g.panel.timeSeries.standardOptions.withOverrides([
957+ g.panel.timeSeries.fieldOverride.byValue.new({op: 'gte' , reducer: 'allIsZero' , value: 0 })
958+ + g.panel.timeSeries.fieldOverride.byValue.withProperty('custom.hideFrom' , {legend: true , tooltip: true , viz: false }),
959+ ])
960+ + g.panel.timeSeries.options.tooltip.withMode('multi' ),
1001961
1002962 searchAndIndexStoreSizePanel:
1003963 g.panel.timeSeries.new('Store size' )
0 commit comments