...
Code Block |
---|
# Requires python 3.10 mkdir /tmp/catalog_service/ cd /tmp/ # Get the catalog-service pod id for the following command. kubectl cp catalog-service-<...>:/catalog_service ./catalog_service/ pip3 install -r ./catalog_service/requirements.txt # migrate alerts (use -h for help) python3 ./catalog_service/catalog.py --download_installed --grafana_address https://<source-kfs-cluster>.kloudfuse.io --artifact_type alerts python3 ./catalog_service/catalog.py --grafana_address https://<target-kfs-cluster>.kloudfuse.io --artifact_type alerts --explore --use_dir /tmp/alerts_downloads # migrate dashboards (use -h for help) python3 ./catalog_service/catalog.py --download_installed --grafana_address https://<source-kfs-cluster>.kloudfuse.io --artifact_type dashboards python3 ./catalog_service/catalog.py --grafana_address https://<target-kfs-cluster>.kloudfuse.io --artifact_type dashboards --explore --use_dir /tmp/dashboards_downloads |
Manually uploading artifacts (dashboards/alerts) to Kloudfuse
Download from existing
Ensure you’ve downloaded the alerts/dashboards in json format to be uploaded to Kloudfuse and are available in the catalog-service pod. You can connect to catalog service pod with above instructions
Upload to Kloudfuse
Create a directory structure as follows in your <<download_directory>>
For alerts mkdir -p <<download_directory>>/assets/upload/alerts
For dashboards mkdir -p <<download_directory>>/assets/upload/dashboards
Copy the alerts and/or dashboards to respective directories. Use following command to explore and install these artifacts into the kfuse embedded grafana.
Code Block python3 catalog.py --explore --artifact_type=alerts --use_dir=<<download_directory>>
Caveats
the artifacts that are installed using the catalog are considered to be “staged” for the user to tweak as needed. This, ideally, shouldn’t be considered as the final destination of how users should manage their artifacts and their life-cycle (as code) as each organization has their own way of managing these. The user should ideally move these to other folders as desired and then use their life-cycle management workflows from there.
if artifacts with same name in the same folder are already installed (found), the catalog will NOT overwrite them and will skip them by default. If users need to update their installed artifacts, then they should first delete the existing artifacts. Also, a sample config.yaml file is provided which can be used to control how artifacts are merged (applies to alerts only for now).
...