Add a script to get Xymon's alerts variables
This commit is contained in:
parent
a3832036b4
commit
25d460d928
|
@ -0,0 +1,23 @@
|
||||||
|
#!/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
|
Loading…
Reference in New Issue