From 779b567eba282d46d7dee2b5f8d659c276634a37 Mon Sep 17 00:00:00 2001 From: vishnuchalla Date: Mon, 2 Oct 2023 10:41:42 -0400 Subject: [PATCH] Added: Support for multiple multiple folders, python client (#78) Modified: Internal logic for creating/updating dashboards Deleted: Removed old logic as it is not flexible for automation Co-authored-by: Vishnu Challa --- .github/workflows/ci.yml | 30 ++-- .github/workflows/grafana.yml | 15 +- Dockerfile | 21 +++ Makefile | 9 +- dittybopper/README.md | 4 +- dittybopper/deploy.sh | 4 +- dittybopper/k8s-deploy.sh | 1 + dittybopper/syncer/Dockerfile | 7 - dittybopper/syncer/entrypoint.py | 129 ++++++++++++++++++ dittybopper/syncer/entrypoint.sh | 22 --- .../templates/dittybopper.yaml.template | 8 +- .../templates/k8s-dittybopper.yaml.template | 8 +- requirements.txt | 2 + .../api-performance-overview.jsonnet | 2 +- .../{ => General}/cilium-k8s-perf.jsonnet | 2 +- .../etcd-on-cluster-dashboard.jsonnet | 2 +- .../hypershift-performance.jsonnet | 2 +- templates/{ => General}/k8s-perf.jsonnet | 2 +- templates/{ => General}/kube-burner.jsonnet | 2 +- .../{ => General}/ocp-performance.jsonnet | 2 +- templates/{ => General}/ovn-dashboard.jsonnet | 2 +- .../{ => General}/pgbench-dashboard.jsonnet | 2 +- templates/{ => General}/uperf-perf.jsonnet | 2 +- .../{ => General}/vegeta-wrapper.jsonnet | 2 +- templates/{ => General}/ycsb.jsonnet | 2 +- 25 files changed, 201 insertions(+), 83 deletions(-) create mode 100644 Dockerfile delete mode 100644 dittybopper/syncer/Dockerfile create mode 100644 dittybopper/syncer/entrypoint.py delete mode 100755 dittybopper/syncer/entrypoint.sh create mode 100644 requirements.txt rename templates/{ => General}/api-performance-overview.jsonnet (99%) rename templates/{ => General}/cilium-k8s-perf.jsonnet (99%) rename templates/{ => General}/etcd-on-cluster-dashboard.jsonnet (99%) rename templates/{ => General}/hypershift-performance.jsonnet (99%) rename templates/{ => General}/k8s-perf.jsonnet (99%) rename templates/{ => General}/kube-burner.jsonnet (99%) rename templates/{ => General}/ocp-performance.jsonnet (99%) rename templates/{ => General}/ovn-dashboard.jsonnet (99%) rename templates/{ => General}/pgbench-dashboard.jsonnet (98%) rename templates/{ => General}/uperf-perf.jsonnet (99%) rename templates/{ => General}/vegeta-wrapper.jsonnet (98%) rename templates/{ => General}/ycsb.jsonnet (99%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48d7fa1..db020a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,19 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: + lint: + runs-on: ubuntu-latest + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Get dependencies + run: make deps + + - name: Run jsonnetfmt + run: make format + build: runs-on: ubuntu-latest @@ -35,23 +48,10 @@ jobs: - name: Import dashboards to grafana run: > - for t in rendered/*.json; do + for t in rendered/**/*.json; do echo "Importing ${t}"; dashboard=$(cat ${t}); echo "{\"dashboard\": ${dashboard}, \"overwrite\": true}" | curl -k -Ss -XPOST -H "Content-Type: application/json" -H "Accept: application/json" -d@- "http://admin:admin@localhost:3000/api/dashboards/db" -o /dev/null; - done - - lint: - runs-on: ubuntu-latest - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: Get dependencies - run: make deps - - - name: Run jsonnetfmt - run: for t in templates/*.jsonnet; do echo "Testing template ${t}"; ./bin/jsonnetfmt --test $t; echo 'Results:' ${?}; done + done \ No newline at end of file diff --git a/.github/workflows/grafana.yml b/.github/workflows/grafana.yml index f87ed2b..0618d03 100644 --- a/.github/workflows/grafana.yml +++ b/.github/workflows/grafana.yml @@ -3,10 +3,6 @@ defaults: run: shell: bash -env: - # Space separated list as a string of all dashboard json files in "rendered" to load - DASHBOARDS: "kube-burner.json" - on: push: branches: [ master ] @@ -25,13 +21,10 @@ jobs: # The secret GRAFANA_URL must be set with the format http://username:password@url.org without a trailing / - name: Import dashboards to grafana run: > - dashboard_list=($(echo $DASHBOARDS)); - for path in "${dashboard_list[@]}"; do - full_path="rendered/${path}"; - echo "Importing ${full_path}"; - dashboard=$(cat ${full_path}); + for t in rendered/**/*.json; do + echo "Importing ${t}"; + dashboard=$(cat ${t}); echo "{\"dashboard\": ${dashboard}, \"overwrite\": true}" | curl -k -Ss -XPOST -H "Content-Type: application/json" -H "Accept: application/json" -d@- "${{ secrets.GRAFANA_URL }}/api/dashboards/db" -o /dev/null; - done - + done \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..98f1f46 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM registry.access.redhat.com/ubi8/ubi-minimal + +# Set the working directory +WORKDIR /performance-dashboards + +# Install necessary libraries for subsequent commands +RUN microdnf install -y podman python3 python3-pip && \ + microdnf clean all && \ + rm -rf /var/cache/yum + +COPY . . + +# Set permissions +RUN chmod -R 775 /performance-dashboards + +# Install dependencies +RUN pip3 install --upgrade pip && \ + pip3 install -r requirements.txt + +# Start the command +CMD ["python3", "dittybopper/syncer/entrypoint.py"] \ No newline at end of file diff --git a/Makefile b/Makefile index 479a16b..2b6a8ff 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,10 @@ SYNCER_IMG_TAG ?= quay.io/cloud-bulldozer/dittybopper-syncer:latest PLATFORM = linux/amd64,linux/arm64,linux/ppc64le,linux/s390x # Get all templates at $(TEMPLATESDIR) -TEMPLATES = $(wildcard $(TEMPLATESDIR)/*.jsonnet) +TEMPLATES := $(wildcard $(TEMPLATESDIR)/**/*.jsonnet) # Replace $(TEMPLATESDIR)/*.jsonnet by $(OUTPUTDIR)/*.json -outputs = $(patsubst $(TEMPLATESDIR)/%.jsonnet, $(OUTPUTDIR)/%.json, $(TEMPLATES)) +outputs := $(patsubst $(TEMPLATESDIR)/%.jsonnet, $(OUTPUTDIR)/%.json, $(TEMPLATES)) all: deps format build @@ -38,10 +38,11 @@ $(BINDIR)/jsonnet: # Build each template and output to $(OUTPUTDIR) $(OUTPUTDIR)/%.json: $(TEMPLATESDIR)/%.jsonnet @echo "Building template $<" + mkdir -p $(dir $@) $(BINDIR)/jsonnet $< > $@ build-syncer-image: build - podman build --platform=${PLATFORM} -f dittybopper/syncer/Dockerfile --manifest=${SYNCER_IMG_TAG} . + podman build --platform=${PLATFORM} -f Dockerfile --manifest=${SYNCER_IMG_TAG} . push-syncer-image: - podman manifest push ${SYNCER_IMG_TAG} ${SYNCER_IMG_TAG} + podman manifest push ${SYNCER_IMG_TAG} ${SYNCER_IMG_TAG} \ No newline at end of file diff --git a/dittybopper/README.md b/dittybopper/README.md index ee9fed2..3975a3a 100644 --- a/dittybopper/README.md +++ b/dittybopper/README.md @@ -27,9 +27,9 @@ If using disconnected, you need to sync the cloud-bulldozer grafana image (shown dittybopper/templates/dittybopper.yaml.template file) and your chosen syncer image (defaults to quay.io/cloud-bulldozer/dittybopper-syncer:latest). -The syncer image is built with the context at the root of the repository, and the image in the dittybopper/syncer directory. +The syncer image is built with the context at the root of the repository, and the image in the root directory. You can build it with `make build-syncer-image SYNCER_IMG_TAG=container.registry.org/organization/syncer:latest` -Alternatively, you can run the following command form the root folder of this repository: `podman build -f dittybopper/syncer/Dockerfile -t=container.registry.org/organization/syncer:latest .` +Alternatively, you can run the following command from the root folder of this repository: `podman build -f Dockerfile -t=container.registry.org/organization/syncer:latest .` ## Contribute diff --git a/dittybopper/deploy.sh b/dittybopper/deploy.sh index 09d0cde..c90adb4 100755 --- a/dittybopper/deploy.sh +++ b/dittybopper/deploy.sh @@ -40,8 +40,8 @@ END export PROMETHEUS_USER=internal export GRAFANA_ADMIN_PASSWORD=admin -export DASHBOARDS="ocp-performance.json api-performance-overview.json etcd-on-cluster-dashboard.json hypershift-performance.json ovn-dashboard.json" -export SYNCER_IMAGE=${SYNCER_IMAGE:-"quay.io/cloud-bulldozer/dittybopper-syncer:latest"} # Syncer image +export GRAFANA_URL="http://admin:${GRAFANA_ADMIN_PASSWORD}@localhost:3000" +export SYNCER_IMAGE=${SYNCER_IMAGE:-"quay.io/cloud-bulldozer/syncer:latest"} # Syncer image export GRAFANA_IMAGE=${GRAFANA_IMAGE:-"quay.io/cloud-bulldozer/grafana:9.4.3"} # Syncer image # Set defaults for command options diff --git a/dittybopper/k8s-deploy.sh b/dittybopper/k8s-deploy.sh index 47eb7aa..7ba6817 100755 --- a/dittybopper/k8s-deploy.sh +++ b/dittybopper/k8s-deploy.sh @@ -38,6 +38,7 @@ END export PROMETHEUS_USER=internal export GRAFANA_ADMIN_PASSWORD=admin +export GRAFANA_URL="http://admin:${GRAFANA_ADMIN_PASSWORD}@localhost:3000" export DASHBOARDS="k8s-performance.json" export SYNCER_IMAGE=${SYNCER_IMAGE:-"quay.io/cloud-bulldozer/dittybopper-syncer:latest"} # Syncer image export GRAFANA_IMAGE=${GRAFANA_IMAGE:-"quay.io/cloud-bulldozer/grafana:9.4.3"} # Syncer image diff --git a/dittybopper/syncer/Dockerfile b/dittybopper/syncer/Dockerfile deleted file mode 100644 index 851b462..0000000 --- a/dittybopper/syncer/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM registry.access.redhat.com/ubi8/ubi-minimal - -WORKDIR /performance-dashboards -COPY dittybopper/syncer/entrypoint.sh /bin/entrypoint.sh -COPY rendered/*.json /performance-dashboards/ -RUN chmod -R 775 /performance-dashboards -ENTRYPOINT ["entrypoint.sh"] diff --git a/dittybopper/syncer/entrypoint.py b/dittybopper/syncer/entrypoint.py new file mode 100644 index 0000000..e9d607a --- /dev/null +++ b/dittybopper/syncer/entrypoint.py @@ -0,0 +1,129 @@ +import json +import logging +import os +import requests +import uuid +import time +from collections import defaultdict + +logging.basicConfig(level=logging.INFO) + + +class GrafanaOperations: + """ + This class is responsible for Grafana operations + """ + def __init__(self, grafana_url: str, input_directory: str): + self.grafana_url = grafana_url + self.input_directory = input_directory + self.dashboards = defaultdict(list) + self.folder_map = dict() + self.logger = logging.getLogger(__name__) + + def fetch_all_dashboards(self): + """ + This method fetches all rendered dashboards + :return: + """ + self.get_all_folders() + self.folder_map['General'] = None + for root, _, files in os.walk(self.input_directory): + folder_name = os.path.basename(root) + json_files = [os.path.join(root, filename) for filename in files if filename.endswith(".json")] + folder_name = "General" if (folder_name == "") else folder_name + if folder_name in self.folder_map: + folder_id = self.folder_map[folder_name] + else: + folder_id = self.create_folder(folder_name) + self.dashboards[folder_id].extend(json_files) + + def get_all_folders(self): + """ + This method gets the entire list of folders in grafana + :return: + """ + headers = { + "Content-Type": "application/json", + "Accept": "application/json", + } + try: + response = requests.get( + f"{self.grafana_url}/api/folders", + headers=headers, + ) + response_json = response.json() + self.folder_map = {each_folder['title']: each_folder['id'] for each_folder in response_json} + except requests.exceptions.RequestException as e: + raise Exception(f"Error listing folders. Message: {e}") + + def create_folder(self, folder_name): + """ + This method creates a folder in grafana + :return: + """ + uid = str(uuid.uuid4()) + headers = { + "Content-Type": "application/json", + "Accept": "application/json", + } + try: + response = requests.post( + f"{self.grafana_url}/api/folders", + headers=headers, + json={ + "title": folder_name, + "uid": uid, + }, + ) + response_json = response.json() + self.folder_map[folder_name] = id + return response_json['id'] + + except requests.exceptions.RequestException as e: + raise Exception(f"Error creating folder with name:'{self.folder_name}' and uid:'{uid}'. Message: {e}") + + def read_dashboard_json(self, json_file): + """ + This method reads dashboard from json file + :return: + """ + with open(json_file, 'r') as f: + return json.load(f) + + def create_dashboards(self): + """ + This method creates/updates dashboard with new json + :return: + """ + headers = { + "Content-Type": "application/json", + "Accept": "application/json", + } + for folder_id, files in self.dashboards.items(): + for json_file in set(files): + dashboard_json = self.read_dashboard_json(json_file) + try: + response = requests.post( + f"{self.grafana_url}/api/dashboards/db", + headers=headers, + json={ + "dashboard": dashboard_json, + "folderId": folder_id, + "overwrite": True, + }, + ) + if response.status_code == 200: + self.logger.info(f"Dashboard '{dashboard_json['title']}' created successfully in folder '{folder_id}'") + else: + raise Exception( + f"Failed to create dashboard '{dashboard_json['title']}' in folder '{folder_id}'. Status code: {response.status_code}. Message: {response.text}") + + except requests.exceptions.RequestException as e: + raise Exception(f"Error creating dashboard '{dashboard_json['title']}' in folder '{folder_id}'. Message: {e}") + +if __name__ == '__main__': + grafana_operations = GrafanaOperations(os.environ.get("GRAFANA_URL"), os.environ.get("INPUT_DIR")) + grafana_operations.fetch_all_dashboards() + grafana_operations.create_dashboards() + while True: + time.sleep(60) diff --git a/dittybopper/syncer/entrypoint.sh b/dittybopper/syncer/entrypoint.sh deleted file mode 100755 index d674d90..0000000 --- a/dittybopper/syncer/entrypoint.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -while [[ $(curl -s -o /dev/null -w '%{http_code}' http://localhost:3000/api/health) != "200" ]]; do - echo "Grafana still not ready, waiting 5 seconds" - sleep 5 -done - -for d in ${DASHBOARDS}; do - if [[ ! -f $d ]]; then - echo "Dashboard ${d} not found" - continue - else - echo "Importing dashboard $d" - dashboard=$(cat ${d}) - echo "{\"dashboard\": ${dashboard}, \"overwrite\": true}" | \ - curl -Ss -XPOST -H "Content-Type: application/json" -H "Accept: application/json" -d@- \ - "http://admin:${GRAFANA_ADMIN_PASSWORD}@localhost:3000/api/dashboards/db" -o /dev/null - fi -done - -echo "Dittybopper ready" -exec sleep inf diff --git a/dittybopper/templates/dittybopper.yaml.template b/dittybopper/templates/dittybopper.yaml.template index 725cbc0..b9f8945 100644 --- a/dittybopper/templates/dittybopper.yaml.template +++ b/dittybopper/templates/dittybopper.yaml.template @@ -60,10 +60,10 @@ spec: - name: dittybopper-syncer imagePullPolicy: Always env: - - name: GRAFANA_ADMIN_PASSWORD - value: ${GRAFANA_ADMIN_PASSWORD} - - name: DASHBOARDS - value: ${DASHBOARDS} + - name: GRAFANA_URL + value: ${GRAFANA_URL} + - name: INPUT_DIR + value: "/performance-dashboards/rendered/" image: ${SYNCER_IMAGE} volumes: - name: sc-grafana-config diff --git a/dittybopper/templates/k8s-dittybopper.yaml.template b/dittybopper/templates/k8s-dittybopper.yaml.template index 282cf69..cffb85a 100644 --- a/dittybopper/templates/k8s-dittybopper.yaml.template +++ b/dittybopper/templates/k8s-dittybopper.yaml.template @@ -48,10 +48,10 @@ spec: - name: dittybopper-syncer imagePullPolicy: Always env: - - name: GRAFANA_ADMIN_PASSWORD - value: ${GRAFANA_ADMIN_PASSWORD} - - name: DASHBOARDS - value: ${DASHBOARDS} + - name: GRAFANA_URL + value: ${GRAFANA_URL} + - name: INPUT_DIR + value: "/performance-dashboards/rendered/" image: ${SYNCER_IMAGE} volumes: - name: sc-grafana-config diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..138d722 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +requests==2.26.0 + diff --git a/templates/api-performance-overview.jsonnet b/templates/General/api-performance-overview.jsonnet similarity index 99% rename from templates/api-performance-overview.jsonnet rename to templates/General/api-performance-overview.jsonnet index 77f4db2..246e9ff 100644 --- a/templates/api-performance-overview.jsonnet +++ b/templates/General/api-performance-overview.jsonnet @@ -1,4 +1,4 @@ -local grafana = import 'grafonnet-lib/grafonnet/grafana.libsonnet'; +local grafana = import '../grafonnet-lib/grafonnet/grafana.libsonnet'; local prometheus = grafana.prometheus; //Panel definitions diff --git a/templates/cilium-k8s-perf.jsonnet b/templates/General/cilium-k8s-perf.jsonnet similarity index 99% rename from templates/cilium-k8s-perf.jsonnet rename to templates/General/cilium-k8s-perf.jsonnet index 3bcef8b..90c21f0 100644 --- a/templates/cilium-k8s-perf.jsonnet +++ b/templates/General/cilium-k8s-perf.jsonnet @@ -1,4 +1,4 @@ -local grafana = import 'grafonnet-lib/grafonnet/grafana.libsonnet'; +local grafana = import '../grafonnet-lib/grafonnet/grafana.libsonnet'; local prometheus = grafana.prometheus; diff --git a/templates/etcd-on-cluster-dashboard.jsonnet b/templates/General/etcd-on-cluster-dashboard.jsonnet similarity index 99% rename from templates/etcd-on-cluster-dashboard.jsonnet rename to templates/General/etcd-on-cluster-dashboard.jsonnet index ca52c2e..68bbc9d 100644 --- a/templates/etcd-on-cluster-dashboard.jsonnet +++ b/templates/General/etcd-on-cluster-dashboard.jsonnet @@ -1,4 +1,4 @@ -local grafana = import 'grafonnet-lib/grafonnet/grafana.libsonnet'; +local grafana = import '../grafonnet-lib/grafonnet/grafana.libsonnet'; local prometheus = grafana.prometheus; // Panel definitions diff --git a/templates/hypershift-performance.jsonnet b/templates/General/hypershift-performance.jsonnet similarity index 99% rename from templates/hypershift-performance.jsonnet rename to templates/General/hypershift-performance.jsonnet index bd321e4..8416234 100644 --- a/templates/hypershift-performance.jsonnet +++ b/templates/General/hypershift-performance.jsonnet @@ -1,4 +1,4 @@ -local grafana = import 'grafonnet-lib/grafonnet/grafana.libsonnet'; +local grafana = import '../grafonnet-lib/grafonnet/grafana.libsonnet'; local prometheus = grafana.prometheus; local stat = grafana.statPanel; diff --git a/templates/k8s-perf.jsonnet b/templates/General/k8s-perf.jsonnet similarity index 99% rename from templates/k8s-perf.jsonnet rename to templates/General/k8s-perf.jsonnet index d00dcb1..7308819 100644 --- a/templates/k8s-perf.jsonnet +++ b/templates/General/k8s-perf.jsonnet @@ -1,4 +1,4 @@ -local grafana = import 'grafonnet-lib/grafonnet/grafana.libsonnet'; +local grafana = import '../grafonnet-lib/grafonnet/grafana.libsonnet'; local prometheus = grafana.prometheus; diff --git a/templates/kube-burner.jsonnet b/templates/General/kube-burner.jsonnet similarity index 99% rename from templates/kube-burner.jsonnet rename to templates/General/kube-burner.jsonnet index 5e32c18..cdb5160 100644 --- a/templates/kube-burner.jsonnet +++ b/templates/General/kube-burner.jsonnet @@ -1,4 +1,4 @@ -local grafana = import 'grafonnet-lib/grafonnet/grafana.libsonnet'; +local grafana = import '../grafonnet-lib/grafonnet/grafana.libsonnet'; local es = grafana.elasticsearch; local worker_count = grafana.statPanel.new( diff --git a/templates/ocp-performance.jsonnet b/templates/General/ocp-performance.jsonnet similarity index 99% rename from templates/ocp-performance.jsonnet rename to templates/General/ocp-performance.jsonnet index bd9c7b3..49a7a42 100644 --- a/templates/ocp-performance.jsonnet +++ b/templates/General/ocp-performance.jsonnet @@ -1,4 +1,4 @@ -local grafana = import 'grafonnet-lib/grafonnet/grafana.libsonnet'; +local grafana = import '../grafonnet-lib/grafonnet/grafana.libsonnet'; local prometheus = grafana.prometheus; diff --git a/templates/ovn-dashboard.jsonnet b/templates/General/ovn-dashboard.jsonnet similarity index 99% rename from templates/ovn-dashboard.jsonnet rename to templates/General/ovn-dashboard.jsonnet index d9abada..2d1a3db 100644 --- a/templates/ovn-dashboard.jsonnet +++ b/templates/General/ovn-dashboard.jsonnet @@ -1,4 +1,4 @@ -local grafana = import 'grafonnet-lib/grafonnet/grafana.libsonnet'; +local grafana = import '../grafonnet-lib/grafonnet/grafana.libsonnet'; local prometheus = grafana.prometheus; local stat = grafana.statPanel; diff --git a/templates/pgbench-dashboard.jsonnet b/templates/General/pgbench-dashboard.jsonnet similarity index 98% rename from templates/pgbench-dashboard.jsonnet rename to templates/General/pgbench-dashboard.jsonnet index bd7d7c5..1f39d0f 100644 --- a/templates/pgbench-dashboard.jsonnet +++ b/templates/General/pgbench-dashboard.jsonnet @@ -1,4 +1,4 @@ -local grafana = import 'grafonnet-lib/grafonnet/grafana.libsonnet'; +local grafana = import '../grafonnet-lib/grafonnet/grafana.libsonnet'; local es = grafana.elasticsearch; local tps_report = grafana.graphPanel.new( diff --git a/templates/uperf-perf.jsonnet b/templates/General/uperf-perf.jsonnet similarity index 99% rename from templates/uperf-perf.jsonnet rename to templates/General/uperf-perf.jsonnet index 1ecd3b4..d70b3ab 100644 --- a/templates/uperf-perf.jsonnet +++ b/templates/General/uperf-perf.jsonnet @@ -1,4 +1,4 @@ -local grafana = import 'grafonnet-lib/grafonnet/grafana.libsonnet'; +local grafana = import '../grafonnet-lib/grafonnet/grafana.libsonnet'; local es = grafana.elasticsearch; diff --git a/templates/vegeta-wrapper.jsonnet b/templates/General/vegeta-wrapper.jsonnet similarity index 98% rename from templates/vegeta-wrapper.jsonnet rename to templates/General/vegeta-wrapper.jsonnet index 338bb95..eed3278 100644 --- a/templates/vegeta-wrapper.jsonnet +++ b/templates/General/vegeta-wrapper.jsonnet @@ -1,4 +1,4 @@ -local grafana = import 'grafonnet-lib/grafonnet/grafana.libsonnet'; +local grafana = import '../grafonnet-lib/grafonnet/grafana.libsonnet'; local es = grafana.elasticsearch; // Panels diff --git a/templates/ycsb.jsonnet b/templates/General/ycsb.jsonnet similarity index 99% rename from templates/ycsb.jsonnet rename to templates/General/ycsb.jsonnet index 893cefb..e6fa8c6 100644 --- a/templates/ycsb.jsonnet +++ b/templates/General/ycsb.jsonnet @@ -1,4 +1,4 @@ -local grafana = import 'grafonnet-lib/grafonnet/grafana.libsonnet'; +local grafana = import '../grafonnet-lib/grafonnet/grafana.libsonnet'; local es = grafana.elasticsearch; //Panel definitions