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, intervalFactor, format, legendFormat)::
62 g.prometheus.target(expr=expr,
63 intervalFactor=intervalFactor,
65 legendFormat=legendFormat),
67 addTemplateSchema(name,
75 g.template.new(name=name,
76 datasource=datasource,
79 includeAll=includeAll,
84 addAnnotationSchema(builtIn,
91 g.annotation.datasource(builtIn=builtIn,
92 datasource=datasource,
99 addRowSchema(collapse, showTitle, title)::
100 g.row.new(collapse=collapse, showTitle=showTitle, title=title),
102 addSingleStatSchema(colors,
113 g.singlestat.new(colors=colors,
114 datasource=datasource,
117 description=description,
119 colorValue=colorValue,
120 gaugeMaxValue=gaugeMaxValue,
122 sparklineShow=sparklineShow,
123 thresholds=thresholds),
125 addPieChartSchema(aliasColors,
132 g.pieChartPanel.new(aliasColors=aliasColors,
133 datasource=datasource,
134 description=description,
135 legendType=legendType,
138 valueName=valueName),
140 addTableSchema(datasource, description, sort, styles, title, transform)::
141 g.tablePanel.new(datasource=datasource,
142 description=description,
146 transform=transform),
161 colorMode: colorMode,
163 dateFormat: dateFormat,
165 mappingType: mappingType,
167 thresholds: thresholds,
170 valueMaps: valueMaps,