#/bin/bash
bin=`dirname $0`
bin=`cd $bin;pwd`
HADOOP_HOME=/home/bigdata/installs/hadoop-1.2.1
HBASE_HOME=/home/bigdata/installs/hbase-0.94.20
DFS_REMAINING_WARNING=15
DFS_REMAINING_CRITICAL=5
ABNORMAL_QUERY="INCONSISTENT|CORRUPT|FAILED|Exception"
# hbck and fsck report
output=/home/bigdata/hdfscluster/cluster-status
$HBASE_HOME/bin/hbase hbck >> $output
$HADOOP_HOME/bin/hadoop fsck /hbase >> $output
# check report
count=`egrep -c "$ABNORMAL_QUERY" $output`
if [ $count -eq 0 ]; then
echo "[OK] Cluster is healthy." >> $output
else
echo "[ABNORMAL] Cluster is abnormal!" >> $output
# Get the last matching entry in the report file
last_entry=`egrep "$ABNORMAL_QUERY" $output | tail -1`
echo "($count) $last_entry"
exit $STATE_CRITICAL
fi
# HDFS usage
dfs_remaining=`curl -s http://hbase-karthik:50070/dfshealth.jsp |egrep -o "DFS Remaining%.*%" | egrep -o "[0-9]*\.[0-9]*"`
dfs_remaining_word="DFS Remaining%: ${dfs_remaining}%"
echo "$dfs_remaining_word" >> $output
# check HDFS usage
dfs_remaining=`echo $dfs_remaining | awk -F '.' '{print $1}'`
if [ $dfs_remaining -lt $DFS_REMAINING_CRITICAL ]; then
echo "Low DFS space. $dfs_remaining_word"
exit_status=$STATE_CRITICAL
elif [ $dfs_remaining -lt $DFS_REMAINING_WARNING ]; then
echo "Low DFS space. $dfs_remaining_word"
exit_status=$STATE_WARNING
else
echo "HBase check OK - DFS and HBase healthy.
$dfs_remaining_word"
exit_status=$STATE_OK
fi
exit $exit_status
bin=`dirname $0`
bin=`cd $bin;pwd`
HADOOP_HOME=/home/bigdata/installs/hadoop-1.2.1
HBASE_HOME=/home/bigdata/installs/hbase-0.94.20
DFS_REMAINING_WARNING=15
DFS_REMAINING_CRITICAL=5
ABNORMAL_QUERY="INCONSISTENT|CORRUPT|FAILED|Exception"
# hbck and fsck report
output=/home/bigdata/hdfscluster/cluster-status
$HBASE_HOME/bin/hbase hbck >> $output
$HADOOP_HOME/bin/hadoop fsck /hbase >> $output
# check report
count=`egrep -c "$ABNORMAL_QUERY" $output`
if [ $count -eq 0 ]; then
echo "[OK] Cluster is healthy." >> $output
else
echo "[ABNORMAL] Cluster is abnormal!" >> $output
# Get the last matching entry in the report file
last_entry=`egrep "$ABNORMAL_QUERY" $output | tail -1`
echo "($count) $last_entry"
exit $STATE_CRITICAL
fi
# HDFS usage
dfs_remaining=`curl -s http://hbase-karthik:50070/dfshealth.jsp |egrep -o "DFS Remaining%.*%" | egrep -o "[0-9]*\.[0-9]*"`
dfs_remaining_word="DFS Remaining%: ${dfs_remaining}%"
echo "$dfs_remaining_word" >> $output
# check HDFS usage
dfs_remaining=`echo $dfs_remaining | awk -F '.' '{print $1}'`
if [ $dfs_remaining -lt $DFS_REMAINING_CRITICAL ]; then
echo "Low DFS space. $dfs_remaining_word"
exit_status=$STATE_CRITICAL
elif [ $dfs_remaining -lt $DFS_REMAINING_WARNING ]; then
echo "Low DFS space. $dfs_remaining_word"
exit_status=$STATE_WARNING
else
echo "HBase check OK - DFS and HBase healthy.
$dfs_remaining_word"
exit_status=$STATE_OK
fi
exit $exit_status
Excellent post. Very interesting to read. I really love to read such a nice post. Thanks! keep rocking.Big data hadoop online training Hyderabad
ReplyDeletedüzce
ReplyDeletesakarya
tunceli
van
bayburt
İO0P4L
görüntülüshow
ReplyDeleteücretli show
FPM6
malatya evden eve nakliyat
ReplyDeleteartvin evden eve nakliyat
kocaeli evden eve nakliyat
ankara evden eve nakliyat
düzce evden eve nakliyat
ZLİ3
05E98
ReplyDeleteÇerkezköy Çelik Kapı
Isparta Evden Eve Nakliyat
Kripto Para Nedir
Tekirdağ Parke Ustası
Yenimahalle Parke Ustası
Maraş Şehir İçi Nakliyat
Adıyaman Evden Eve Nakliyat
Kocaeli Parça Eşya Taşıma
Bitlis Şehirler Arası Nakliyat
2EF6D
ReplyDeleteorder oxandrolone anavar
buy dianabol methandienone
order sarms
testosterone propionat for sale
deca durabolin
https://steroidsbuy.net/
order pharmacy steroids
buy peptides
order halotestin
67A26
ReplyDeleteSohbet
Binance Ne Kadar Komisyon Alıyor
Mexc Borsası Kimin
Snapchat Takipçi Hilesi
Bee Coin Hangi Borsada
Coin Nasıl Çıkarılır
Binance Borsası Güvenilir mi
Btcturk Borsası Güvenilir mi
Okex Borsası Güvenilir mi
BA82F49405
ReplyDeletetiktok takipçi satın al
39CBAFAE42
ReplyDeletetakipçi fiyat