xymon-ext-scripts

Check-in [21a62613b7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fix indent
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: 21a62613b7093ae8341c16ee52fb3b9d9901c2123bce54cf6ea2cd0ed65625f5
User & Date: feld@feld.me 2015-01-29 14:05:57
Context
2015-01-29
15:15
add zfs monitoring script check-in: 5a58bbaf4a user: feld@feld.me tags: master, trunk
14:05
fix indent check-in: 21a62613b7 user: feld@feld.me tags: master, trunk
13:57
formatting check-in: 622bef9208 user: feld@feld.me tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to smart.sh.

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
	OUTPUT=$(sudo smartctl -a /dev/${i});
	SERIAL=$(echo "${OUTPUT}" | grep Serial | awk '{print $3}')
	MODEL=$(echo "${OUTPUT}" | grep "Device Model" | awk '{print $3,$4}')
	REALLOCATED=$(echo "${OUTPUT}" | grep Reallocated_Sector | awk '{print $10}')
	if [ ${REALLOCATED} -gt 0 ] ; then
		HEALTH="FAILED"
	else
	HEALTH=$(echo "${OUTPUT}" | grep "overall-health")
	fi

        case "${HEALTH}" in
                *PASSED)
			echo "&green ${i} PASSED [ Serial: ${SERIAL} Model: ${MODEL} Reallocated: ${REALLOCATED} ]"
                        ;;
		*)







|







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
	OUTPUT=$(sudo smartctl -a /dev/${i});
	SERIAL=$(echo "${OUTPUT}" | grep Serial | awk '{print $3}')
	MODEL=$(echo "${OUTPUT}" | grep "Device Model" | awk '{print $3,$4}')
	REALLOCATED=$(echo "${OUTPUT}" | grep Reallocated_Sector | awk '{print $10}')
	if [ ${REALLOCATED} -gt 0 ] ; then
		HEALTH="FAILED"
	else
		HEALTH=$(echo "${OUTPUT}" | grep "overall-health")
	fi

        case "${HEALTH}" in
                *PASSED)
			echo "&green ${i} PASSED [ Serial: ${SERIAL} Model: ${MODEL} Reallocated: ${REALLOCATED} ]"
                        ;;
		*)