Skip to content

Commit

Permalink
Cilium K8s Performance Dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
smandaRH committed Dec 18, 2023
1 parent aadd6c1 commit 2f092c6
Show file tree
Hide file tree
Showing 4 changed files with 582 additions and 0 deletions.
92 changes: 92 additions & 0 deletions assets/cilium-k8s-perf/panels.libsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonnet';

{
timeSeries: {
local timeSeries = g.panel.timeSeries,
local custom = timeSeries.fieldConfig.defaults.custom,
local options = timeSeries.options,

base(title, unit, targets, gridPos):
timeSeries.new(title)
+ timeSeries.queryOptions.withTargets(targets)
+ timeSeries.datasource.withType('elasticsearch')
+ timeSeries.datasource.withUid('$Datasource')
+ timeSeries.standardOptions.withUnit(unit)
+ timeSeries.gridPos.withX(gridPos.x)
+ timeSeries.gridPos.withY(gridPos.y)
+ timeSeries.gridPos.withH(gridPos.h)
+ timeSeries.gridPos.withW(gridPos.w)
+ custom.withDrawStyle("line")
+ custom.withLineInterpolation("linear")
+ custom.withBarAlignment(0)
+ custom.withLineWidth(1)
+ custom.withFillOpacity(10)
+ custom.withGradientMode("none")
+ custom.withSpanNulls(false)
+ custom.withPointSize(5)
+ custom.withSpanNulls(false)
+ custom.stacking.withMode("none")
+ custom.withShowPoints('never'),

withCiliumAgg(title, unit, targets, gridPos):
self.base(title, unit, targets, gridPos)
+ options.tooltip.withMode('multi')
+ options.tooltip.withSort('desc')
+ options.legend.withShowLegend(true)
+ options.legend.withPlacement('bottom')
+ options.legend.withDisplayMode('table')
+ options.legend.withCalcs([
'mean',
'max'
]),

withClusterAgg(title, unit, targets, gridPos):
self.base(title, unit, targets, gridPos)
+ options.tooltip.withMode('multi')
+ options.tooltip.withSort('desc')
+ options.legend.withShowLegend(true)
+ options.legend.withPlacement('bottom')
+ options.legend.withDisplayMode('table')
+ options.legend.withCalcs([])









},

stat: {
local stat = g.panel.stat,
local options = stat.options,

base(title, unit, targets, gridPos):
stat.new(title)
+ stat.datasource.withType('elasticsearch')
+ stat.datasource.withUid('$Datasource')
+ stat.standardOptions.withUnit(unit)
+ stat.queryOptions.withTargets(targets)
+ stat.gridPos.withX(gridPos.x)
+ stat.gridPos.withY(gridPos.y)
+ stat.gridPos.withH(gridPos.h)
+ stat.gridPos.withW(gridPos.w)
+ options.withJustifyMode("auto")
+ options.withGraphMode("area")
+ options.text.withTitleSize(12),


withclusterAgg(title, unit, targets, gridPos):
self.base(title, unit, targets, gridPos)
+ options.reduceOptions.withCalcs([
'last',
])
+ stat.standardOptions.thresholds.withSteps([]),

}



}
Loading

0 comments on commit 2f092c6

Please sign in to comment.