Replaced hardcoded deltachunk with ${host}

This commit is contained in:
Trey Blancher 2023-08-12 13:16:29 -04:00
parent ea42a066ec
commit 53a4f7f73c

View File

@ -133,12 +133,12 @@ send () {
local email=$(mktemp /tmp/psi.eml.XXXX)
local subj
printf "Pressure Stall Information triggered on ${psi_type} at $(date +'%FT%T %Z')\n\n" > ${email}
printf "Pressure Stall Information for ${host} triggered on ${psi_type} at $(date +'%FT%T %Z')\n\n" > ${email}
if [[ -n "${current_alarms}" ]]; then
subj="PSI on deltachunk ${current_alarms} triggered!"
subj="PSI on ${host} ${current_alarms} triggered!"
printf "Multiple alarms triggered: ${current_alarms}\n\n" >> ${email}
else
subj="PSI on deltachunk ${psi_type} triggered!"
subj="PSI on ${host} ${psi_type} triggered!"
current_alarms="${psi_type}"
fi