Skip to content

Instantly share code, notes, and snippets.

@hexfusion
Created February 6, 2025 15:34
Show Gist options
  • Save hexfusion/4bc57492152b1be8e190cc8ad5dce24d to your computer and use it in GitHub Desktop.
Save hexfusion/4bc57492152b1be8e190cc8ad5dce24d to your computer and use it in GitHub Desktop.
dump prom
#!/bin/bash
ARTIFACT_DIR=$PWD
mkdir -p $ARTIFACT_DIR/metrics
echo "Snapshotting prometheus ..."
oc --insecure-skip-tls-verify exec -n openshift-monitoring prometheus-k8s-0 -- tar cvzf - -C /prometheus . >$ARTIFACT_DIR/metrics/prometheus.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment