-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Move dashboards and fix issues (#417)
Signed-off-by: Thomas Schuetz <[email protected]>
- Loading branch information
Showing
26 changed files
with
7,387 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,4 @@ manifests/ | |
# Examples | ||
/examples/observability/assets/backups/ | ||
|
||
/dashboards/grafana/output/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
GRAFANA_SCHEME ?= http | ||
GRAFANA_HOSTNAME ?= localhost | ||
GRAFANA_USERNAME ?= admin | ||
GRAFANA_PASSWORD ?= admin | ||
GRAFANA_PORT ?= 3000 | ||
|
||
.PHONY: generate | ||
generate: generate-configmaps generate-import | ||
|
||
.PHONY: generate-import | ||
generate-import: | ||
mkdir import | true | ||
./utils/generate-import.sh ./import | ||
|
||
.PHONY: generate-configmap | ||
generate-configmaps: | ||
mkdir configmap | true | ||
kubectl create configmap grafana-dashboard-keptn-overview -n monitoring --from-file=./grafana_dashboard_overview.json -o yaml --dry-run=client > configmap/grafana-dashboard-keptn-overview.yaml | ||
kubectl create configmap grafana-dashboard-keptn-applications -n monitoring --from-file=./grafana_dashboard_applications.json -o yaml --dry-run=client > configmap/grafana-dashboard-keptn-applications.yaml | ||
kubectl create configmap grafana-dashboard-keptn-workloads -n monitoring --from-file=./grafana_dashboard_workloads.json -o yaml --dry-run=client > configmap/grafana-dashboard-keptn-workloads.yaml | ||
cp configmap/* ../../examples/observability/config/prometheus | ||
|
||
.PHONY: import | ||
import: | ||
@curl -X POST -H "Content-Type: application/json" -d @import/grafana_dashboard_overview.json ${GRAFANA_SCHEME}://${GRAFANA_USERNAME}:${GRAFANA_PASSWORD}@${GRAFANA_HOSTNAME}:$(GRAFANA_PORT)/api/dashboards/db | ||
@curl -X POST -H "Content-Type: application/json" -d @import/grafana_dashboard_applications.json ${GRAFANA_SCHEME}://${GRAFANA_USERNAME}:${GRAFANA_PASSWORD}@${GRAFANA_HOSTNAME}:$(GRAFANA_PORT)/api/dashboards/db | ||
@curl -X POST -H "Content-Type: application/json" -d @import/grafana_dashboard_workloads.json ${GRAFANA_SCHEME}://${GRAFANA_USERNAME}:${GRAFANA_PASSWORD}@${GRAFANA_HOSTNAME}:$(GRAFANA_PORT)/api/dashboards/db | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Grafana Dashboards for the Lifecycle Toolkit | ||
|
||
This folder contains the Grafana dashboards for the Keptn Lifecycle Toolkit. | ||
|
||
## Installing the dashboards | ||
It is assumed, that there is a Grafana Instance available. In our provided examples, the dashboards are automatically provisioned. If you want to install the dashboards manually, you can use the following steps: | ||
|
||
```sh | ||
# This defaults to http://localhost:3000, but can be changed by setting the GRAFANA_SCHEME, GRAFANA_URL and GRAFANA_PORT environment variable | ||
# The default credentials are admin:admin, but can be changed by setting the GRAFANA_USERNAME and GRAFANA_PASSWORD environment variable | ||
make install | ||
``` | ||
|
||
## Changing the dashboards | ||
The dashboards can be changed in the Grafana UI. To export dashboards, export them using the share button and replace them in this folder. | ||
|
||
## Exporting the dashboards for the Examples | ||
You can prepare the dashboards for the examples and import using the following command: | ||
|
||
```sh | ||
make generate | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Autogenerated Files - Do not change | ||
|
||
# Grafana Dashboards - ConfigMaps | ||
|
||
This files can be used to autoprovision Grafana dashboards in Kubernetes. | ||
|
||
More information: https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards | ||
|
Oops, something went wrong.