Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kube-prometheus
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
prometheus-operator
kube-prometheus
Commits
d99aefe2
Commit
d99aefe2
authored
5 years ago
by
Deepak Jain
Browse files
Options
Downloads
Patches
Plain Diff
CLOUD-3031| Deepak Jain| adding example file
parent
059e74d1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/developing-prometheus-rules-and-grafana-dashboards.md
+1
-0
1 addition, 0 deletions
docs/developing-prometheus-rules-and-grafana-dashboards.md
examples/grafana-additional-rendered-dashboard-example-2.jsonnet
+16
-0
16 additions, 0 deletions
...s/grafana-additional-rendered-dashboard-example-2.jsonnet
with
17 additions
and
0 deletions
docs/developing-prometheus-rules-and-grafana-dashboards.md
+
1
−
0
View file @
d99aefe2
...
...
@@ -312,6 +312,7 @@ local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
```
Incase you have lots of json dashboard exported out from grafan UI the above approch is going to take lots of time. to improve performance we can use
`rawGrafanaDashboards`
field and provide it's value as json string by using importstr
[
embedmd
]:
#
(../examples/grafana-additional-rendered-dashboard-example-2.jsonnet)
```
jsonnet
local
kp
=
(
import
'kube-prometheus/kube-prometheus.libsonnet'
)
+
{
_config
+::
{
...
...
This diff is collapsed.
Click to expand it.
examples/grafana-additional-rendered-dashboard-example-2.jsonnet
0 → 100644
+
16
−
0
View file @
d99aefe2
local
kp
=
(
import
'kube-prometheus/kube-prometheus.libsonnet'
)
+
{
_config
+::
{
namespace
:
'monitoring'
,
},
rawGrafanaDashboards
+::
{
'my-dashboard.json'
:
(
importstr
'example-grafana-dashboard.json'
),
},
};
{
[
'00namespace-'
+
name
]:
kp
.
kubePrometheus
[
name
]
for
name
in
std
.
objectFields
(
kp
.
kubePrometheus
)
}
+
{
[
'0prometheus-operator-'
+
name
]:
kp
.
prometheusOperator
[
name
]
for
name
in
std
.
objectFields
(
kp
.
prometheusOperator
)
}
+
{
[
'node-exporter-'
+
name
]:
kp
.
nodeExporter
[
name
]
for
name
in
std
.
objectFields
(
kp
.
nodeExporter
)
}
+
{
[
'kube-state-metrics-'
+
name
]:
kp
.
kubeStateMetrics
[
name
]
for
name
in
std
.
objectFields
(
kp
.
kubeStateMetrics
)
}
+
{
[
'alertmanager-'
+
name
]:
kp
.
alertmanager
[
name
]
for
name
in
std
.
objectFields
(
kp
.
alertmanager
)
}
+
{
[
'prometheus-'
+
name
]:
kp
.
prometheus
[
name
]
for
name
in
std
.
objectFields
(
kp
.
prometheus
)
}
+
{
[
'grafana-'
+
name
]:
kp
.
grafana
[
name
]
for
name
in
std
.
objectFields
(
kp
.
grafana
)
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment