xymon-ext-scripts

Check-in [86fe3a1d4f]
Login

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

Overview
Comment:Add fancy status icon and standard-ish verbiage
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: 86fe3a1d4f66ee9aeb8c902a133034a272f431a10498058ae061b1a3e8d8efa8
User & Date: root@vm.feld.me 2015-01-14 02:23:07
Context
2015-01-14
15:03
It's safe to run -F every time as pkg audit does an HTTP if-modified-since check check-in: 868e890053 user: feld@feld.me tags: master, trunk
02:23
Add fancy status icon and standard-ish verbiage check-in: 86fe3a1d4f user: root@vm.feld.me tags: master, trunk
01:47
import pkgaudit.sh check-in: 82baa7134d user: feld@feld.me tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pkgaudit.sh.

87
88
89
90
91
92
93













94
95
96


97
98
99
100
101
102
103
fi

# Ingest all the pkg audit messages.
MSG=$(cat ${TMPFILE})

# NONGREEN was detected.
[ ${NONGREEN} ] && COLOR=${PKGAUDIT_COLOR}














# Report results to Xymon
${XYMON} ${XYMSRV} "status ${MACHINE}.${COLUMN} ${COLOR} $(date)



${MSG}
"

rm ${TMPFILE}

exit 0







>
>
>
>
>
>
>
>
>
>
>
>
>



>
>







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
fi

# Ingest all the pkg audit messages.
MSG=$(cat ${TMPFILE})

# NONGREEN was detected.
[ ${NONGREEN} ] && COLOR=${PKGAUDIT_COLOR}

# Set STATUS message for top of output
case "${COLOR}" in
	green)
		STATUS="&${COLOR} pkgaudit is OK"
		;;
	yellow)
		STATUS="&${COLOR} pkgaudit is WARNING"
		;;
	red)
		STATUS="&${COLOR} pkgaudit is CRITICAL"
		;;
esac

# Report results to Xymon
${XYMON} ${XYMSRV} "status ${MACHINE}.${COLUMN} ${COLOR} $(date)

${STATUS}

${MSG}
"

rm ${TMPFILE}

exit 0