hadoop-ansible/roles/nagios-server/files/nagios-checks/check_hdfs

16 lines
191 B
Bash

#!/bin/bash
chk_hdfs=$( hdfs fsck / | grep 'Status' )
case $chk_hdfs in
*HEALTHY*)
echo "OK - HDFS is healthy"
exit 0
;;
*)
echo "CRITICAL - HDFS is corrupted!"
exit 2
;;
esac