Skip to content

Instantly share code, notes, and snippets.

@mrsiano
Created September 2, 2018 16:12
Show Gist options
  • Save mrsiano/93909564e4b5063c27f45d7beb3cccde to your computer and use it in GitHub Desktop.
Save mrsiano/93909564e4b5063c27f45d7beb3cccde to your computer and use it in GitHub Desktop.
primitive monitor for prometheus storage mount
while true;
do
echo "$(date +'%m-%d-%y-%H:%M:%S') $(oc exec prometheus-k8s-0 -n openshift-monitoring -c prometheus -- df |grep -v tmp |grep '/prometheus')" >> ~/pvc_monitor_0.log
echo "$(date +'%m-%d-%y-%H:%M:%S') $(oc exec prometheus-k8s-1 -n openshift-monitoring -c prometheus -- df |grep -v tmp |grep '/prometheus')" >> ~/pvc_monitor_1.log
sleep 15
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment