xymon-ext-scripts

Check-in [622bef9208]
Login

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

Overview
Comment:formatting
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: 622bef9208279992ae82b451e789e6e7c65c66d303b5fd5a80a770194294e116
User & Date: feld@feld.me 2015-01-29 13:57:41
Context
2015-01-29
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
13:53
Only issue one smartctl command per drive Also fail if there are any reallocated sectors check-in: 16c227a4e0 user: feld@feld.me tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to smart.sh.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
		HEALTH="FAILED"
	else
	HEALTH=$(echo "${OUTPUT}" | grep "overall-health")
	fi

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

STATUS="$(hostname) SMART health status"

if (echo ${MSG} | grep -q FAILED); then
	COLOR=red







|


|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
		HEALTH="FAILED"
	else
	HEALTH=$(echo "${OUTPUT}" | grep "overall-health")
	fi

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

STATUS="$(hostname) SMART health status"

if (echo ${MSG} | grep -q FAILED); then
	COLOR=red