Skip to content
Snippets Groups Projects
Unverified Commit 9c93c7ae authored by paulfantom's avatar paulfantom
Browse files

docs: regenerate

parent ab3dff20
No related branches found
No related tags found
No related merge requests found
...@@ -274,34 +274,36 @@ local template = grafana.template; ...@@ -274,34 +274,36 @@ local template = grafana.template;
local graphPanel = grafana.graphPanel; local graphPanel = grafana.graphPanel;
local kp = (import 'kube-prometheus/main.libsonnet') + { local kp = (import 'kube-prometheus/main.libsonnet') + {
_config+:: { values+:: {
namespace: 'monitoring', common+:: {
}, namespace: 'monitoring',
grafana+:: { },
dashboards+:: { grafana+: {
'my-dashboard.json': dashboards+:: {
dashboard.new('My Dashboard') 'my-dashboard.json':
.addTemplate( dashboard.new('My Dashboard')
{ .addTemplate(
current: { {
text: 'Prometheus', current: {
value: 'Prometheus', text: 'Prometheus',
value: 'Prometheus',
},
hide: 0,
label: null,
name: 'datasource',
options: [],
query: 'prometheus',
refresh: 1,
regex: '',
type: 'datasource',
}, },
hide: 0, )
label: null, .addRow(
name: 'datasource', row.new()
options: [], .addPanel(graphPanel.new('My Panel', span=6, datasource='$datasource')
query: 'prometheus', .addTarget(prometheus.target('vector(1)')))
refresh: 1, ),
regex: '', },
type: 'datasource',
},
)
.addRow(
row.new()
.addPanel(graphPanel.new('My Panel', span=6, datasource='$datasource')
.addTarget(prometheus.target('vector(1)')))
),
}, },
}, },
}; };
...@@ -322,15 +324,14 @@ As jsonnet is a superset of json, the jsonnet `import` function can be used to i ...@@ -322,15 +324,14 @@ As jsonnet is a superset of json, the jsonnet `import` function can be used to i
[embedmd]:# (../examples/grafana-additional-rendered-dashboard-example.jsonnet) [embedmd]:# (../examples/grafana-additional-rendered-dashboard-example.jsonnet)
```jsonnet ```jsonnet
local kp = (import 'kube-prometheus/main.libsonnet') + { local kp = (import 'kube-prometheus/main.libsonnet') + {
_config+:: { values+:: {
namespace: 'monitoring', common+:: {
}, namespace: 'monitoring',
grafanaDashboards+:: { // monitoring-mixin compatibility },
'my-dashboard.json': (import 'example-grafana-dashboard.json'), grafana+: {
}, dashboards+:: { // use this method to import your dashboards to Grafana
grafana+:: { 'my-dashboard.json': (import 'example-grafana-dashboard.json'),
dashboards+:: { // use this method to import your dashboards to Grafana },
'my-dashboard.json': (import 'example-grafana-dashboard.json'),
}, },
}, },
}; };
...@@ -348,12 +349,14 @@ In case you have lots of json dashboard exported out from grafana UI the above a ...@@ -348,12 +349,14 @@ In case you have lots of json dashboard exported out from grafana UI the above a
[embedmd]:# (../examples/grafana-additional-rendered-dashboard-example-2.jsonnet) [embedmd]:# (../examples/grafana-additional-rendered-dashboard-example-2.jsonnet)
```jsonnet ```jsonnet
local kp = (import 'kube-prometheus/main.libsonnet') + { local kp = (import 'kube-prometheus/main.libsonnet') + {
_config+:: { values+:: {
namespace: 'monitoring', common+:: {
}, namespace: 'monitoring',
grafana+:: { },
rawDashboards+:: { grafana+: {
'my-dashboard.json': (importstr 'example-grafana-dashboard.json'), rawDashboards+:: {
'my-dashboard.json': (importstr 'example-grafana-dashboard.json'),
},
}, },
}, },
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment