The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/devenv/bulk-folders/bulk-folders.sh

20 lines
758 B

#!/usr/bin/env bash
echo "Deleting previous bulk folders"
find ./bulk-folders -type d -name "Bulk Folder*" -exec rm -rf "{}" \;
numberOfFolders=${1:-200}
numberOfDashboardsPerFolder=${2:-3}
for (( folderCounter=1; folderCounter<="$numberOfFolders"; folderCounter++ ))
do
echo "Creating folder $folderCounter"
folderPath="bulk-folders/Bulk Folder ${folderCounter}"
mkdir -p "$folderPath"
for (( dashCounter=1; dashCounter<="$numberOfDashboardsPerFolder"; dashCounter++ ))
do
jsonnet -o "$folderPath/dashboard${dashCounter}.json" -e "local bulkDash = import 'bulk-dashboards/bulkdash.jsonnet'; bulkDash + { uid: 'bulk-folder-${folderCounter}-${dashCounter}', title: 'Bulk Folder ${folderCounter} Dashboard ${dashCounter}' }"
done
done