first commit
This commit is contained in:
20
scripts/gluster_checks/pod_loop_gluster_heal_status.sh
Normal file
20
scripts/gluster_checks/pod_loop_gluster_heal_status.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
#Roy Cohen :roy@wondercohen.nl
|
||||
#objective :Gluster heal status volume check in a pod
|
||||
#First line of code :15/01/2019
|
||||
#last update :31/01/2019
|
||||
#version :1.2
|
||||
#info:
|
||||
#This script needs to be added to cron and run every 3 min
|
||||
#Some general vars
|
||||
STORAGE_IP=$(ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
|
||||
|
||||
######START OF SCRIPT#######
|
||||
|
||||
|
||||
# get volume heal status and redirect it to a tmp file
|
||||
for volume in $(/usr/sbin/gluster volume info|grep "Volume Name:" | cut -d ":" -f2)
|
||||
do
|
||||
echo "volume, $volume"
|
||||
/usr/sbin/gluster v heal $volume info|grep "Status:"| grep "not connected"
|
||||
done
|
Reference in New Issue
Block a user