xymon-ext-scripts

Check-in [9141752393]
Login

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

Overview
Comment:Shellcheck fixes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: 9141752393164b2dde3644dad88585d30d5a1c6013fb0551851f3e4fe352470f
User & Date: feld@feld.me 2015-03-16 12:49:31
Context
2015-03-16
13:01
Consolidate redirection check-in: 8724c39bb0 user: feld@feld.me tags: master, trunk
12:49
Shellcheck fixes check-in: 9141752393 user: feld@feld.me tags: master, trunk
2015-02-05
22:30
Fix path to smartctl check-in: 099856841f user: feld@feld.me tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to gmirror.sh.

41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
PATH=${PATH}:/usr/local/bin:/usr/local/sbin

COLUMN=gmirror
COLOR=green

MSG=$(gmirror status -s)

if $(echo ${MSG} | egrep -q 'DEGRADED|SYNCHRONIZING') ; then
	STATUS="&red $(hostname) gmirror status is DEGRADED"
	COLOR=red
else
	STATUS="&green $(hostname) gmirror status is OK"
fi

${XYMON} ${XYMSRV} "status ${MACHINE}.${COLUMN} ${COLOR} $(date)

${STATUS}

${MSG}
"







|






|





41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
PATH=${PATH}:/usr/local/bin:/usr/local/sbin

COLUMN=gmirror
COLOR=green

MSG=$(gmirror status -s)

if echo "${MSG}" | egrep -q 'DEGRADED|SYNCHRONIZING' ; then
	STATUS="&red $(hostname) gmirror status is DEGRADED"
	COLOR=red
else
	STATUS="&green $(hostname) gmirror status is OK"
fi

${XYMON} "${XYMSRV}" "status ${MACHINE}.${COLUMN} ${COLOR} $(date)

${STATUS}

${MSG}
"