This repo is very similar to dittybopper, this will be used to help users visualize their krkn runs as well as general data and performance of their clusters
On Kubernetes Cluster
./deploy.sh
On OpenShift Cluster
./deploy.sh -c oc
Deploys a mutable Grafana pod with default dashboards for monitoring system submetrics during workload/benchmark runs.
Options:
-c <kubectl_cmd>
: The command to use for k8s admin (defaults tokubectl
).-n <namespace>
: The namespace in which to deploy the Grafana instance (defaults tokrkn-visualize
).-p <grafana_pass>
: The password to configure for the Grafana admin user (defaults toadmin
).-i <dash_path>
: Import dashboard from given path. Using this flag will bypass the deployment process and only do the import to an already-running Grafana pod. Can be a local path or a remote URL beginning with http.-d
: Delete an existing deployment (namespace and Grafana).-h
: Show help message and exit.
Example Usage:
./deploy.sh # Deploy Grafana in 'krkn-visualize' namespace with default password
./deploy.sh -n myns -p secret # Deploy in 'myns' namespace with custom password
./deploy.sh -i dashboard.json # Import dashboard to running Grafana
./deploy.sh -d # Delete deployment and namespace
After the grafana dashboard has been created, you'll need to add in data sources to connect to your local elasic search
You'll need to create 3 data sources connecting to krkn-telemetry, krkn-metrics and krkn-alerts indexes or the indexes you defined here
- Log in as admin user
- Find Configuration tab and click Data Sources
- Click new data source
- Add a name for the data source, be sure the name contains "Telemetry", "Metrics", and "Alerts" for the corresponding indexes so our dashboards can properly find them
- Add the URL of your elasticsearch
- Add authentication into elastic search
- Give the corresponding index name you're configuring under Elasticsearch details
- Remove the @ from before the timestamp field (Alerts needs created_at)
- Save & test
- Repeat for each index
- Create folder under assets
- Create panels.libsonnet, queries.libsonnet, and variables.libsonnet under the newly created folder
- Create jsonnet file under General or if its specific to kubernetes, k8s
- Run
make
Edit import file to point to newly created rendered json. Note the grafana version needs to match the grafannot listed here, will hit loading errors if not
cd krkn-visualize
./import.sh -i ../rendered/<folder>/<dashboard_name>.json
Options:
-c <kubectl_cmd>
: The command to use for k8s admin (defaults tokubectl
).-n <namespace>
: The namespace in which to deploy the Grafana instance (defaults tokrkn-visualize
).-p <grafana_pass>
: The password to configure for the Grafana admin user (defaults toadmin
).-i <dash_path>
: Import dashboard from given path. Using this flag will bypass the deployment process and only do the import to an already-running Grafana pod.-h
: Show help message and exit.