1 local g = import 'grafonnet/grafana.libsonnet';
13 g.dashboard.new(title=title,
14 description=description,
18 schemaVersion=schemaVersion,
21 timepicker=timepicker),
23 graphPanelSchema(aliasColors,
35 legend_alignAsTable=false,
40 legend_values=false)::
41 g.graphPanel.new(aliasColors=aliasColors,
43 description=description,
44 nullPointMode=nullPointMode,
52 datasource=datasource,
53 legend_alignAsTable=legend_alignAsTable,
54 legend_avg=legend_avg,
55 legend_min=legend_min,
56 legend_max=legend_max,
57 legend_current=legend_current,
58 legend_values=legend_values),
61 addTargetSchema(expr, legendFormat='', format='time_series', intervalFactor=1, instant=null)::
62 g.prometheus.target(expr=expr,
63 legendFormat=legendFormat,
65 intervalFactor=intervalFactor,
68 addTemplateSchema(name,
76 g.template.new(name=name,
77 datasource=datasource,
80 includeAll=includeAll,
85 addAnnotationSchema(builtIn,
92 g.annotation.datasource(builtIn=builtIn,
93 datasource=datasource,
100 addRowSchema(collapse, showTitle, title)::
101 g.row.new(collapse=collapse, showTitle=showTitle, title=title),
103 addSingleStatSchema(colors,
114 g.singlestat.new(colors=colors,
115 datasource=datasource,
118 description=description,
120 colorValue=colorValue,
121 gaugeMaxValue=gaugeMaxValue,
123 sparklineShow=sparklineShow,
124 thresholds=thresholds),
126 addPieChartSchema(aliasColors,
133 g.pieChartPanel.new(aliasColors=aliasColors,
134 datasource=datasource,
135 description=description,
136 legendType=legendType,
139 valueName=valueName),
141 addTableSchema(datasource, description, sort, styles, title, transform)::
142 g.tablePanel.new(datasource=datasource,
143 description=description,
147 transform=transform),
162 colorMode: colorMode,
164 dateFormat: dateFormat,
166 mappingType: mappingType,
168 thresholds: thresholds,
171 valueMaps: valueMaps,