Skip to content

Instantly share code, notes, and snippets.

@hexfusion
Last active April 23, 2021 14:27
Show Gist options
  • Save hexfusion/3cf87f6cdcb45b19fc4a22bca6fd2d87 to your computer and use it in GitHub Desktop.
Save hexfusion/3cf87f6cdcb45b19fc4a22bca6fd2d87 to your computer and use it in GitHub Desktop.
dump-prom.sh
#!/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