scripts/xymon/get.xymon.alert.vars.sh

24 lines
1015 B
Bash
Executable File

#!/bin/sh
log_file="/tmp/xymon.alert.${BBHOSTSVC}.vars"
# Print variables for an alert on a specific host
rm -f -- "${log_file}"
touch "${log_file}"
printf '%b' "BBCOLORLEVEL=\"${BBCOLORLEVEL}\"\\n" >> "${log_file}"
printf '%b' "BBALPHAMSG=\"${BBALPHAMSG}\"\\n" >> "${log_file}"
printf '%b' "ACKCODE=\"${ACKCODE}\"\\n" >> "${log_file}"
printf '%b' "RCPT=\"${RCPT}\"\\n" >> "${log_file}"
printf '%b' "BBHOSTNAME=\"${BBHOSTNAME}\"\\n" >> "${log_file}"
printf '%b' "MACHIP=\"${MACHIP}\"\\n" >> "${log_file}"
printf '%b' "BBSVCNAME=\"${BBSVCNAME}\"\\n" >> "${log_file}"
printf '%b' "BBSVCNUM=\"${BBSVCNUM}\"\\n" >> "${log_file}"
printf '%b' "BBHOSTSVC=\"${BBHOSTSVC}\"\\n" >> "${log_file}"
printf '%b' "BBHOSTSVCCOMMAS=\"${BBHOSTSVCCOMMAS}\"\\n" >> "${log_file}"
printf '%b' "BBNUMERIC=\"${BBNUMERIC}\"\\n" >> "${log_file}"
printf '%b' "RECOVERED=\"${RECOVERED}\"\\n" >> "${log_file}"
printf '%b' "DOWNSECS=\"${DOWNSECS}\"\\n" >> "${log_file}"
printf '%b' "DOWNSECSMSG=\"${DOWNSECSMSG}\"\\n" >> "${log_file}"
exit 0