printf "%b" in notification command definition
Posted: Tue Aug 06, 2019 6:25 am
Can someone please help explain the %b portion of the printf command in the default notification command definitions? Is it just to allow \n to produce new lines in the construction of an email? I want to build an additional notification command that is simplified for SMS messaging (so will all be on a single line) and wondering if I need to keep the %b, replace it with something else or just drop it?
Code: Select all
define command{
command_name notify-host-by-sms
command_line /usr/bin/printf "%b" "$NOTIFICATIONTYPE$ ALERT: $HOSTALIAS$ is $HOSTSTATE$ ($SHORTDATETIME$)" | /usr/bin/sendemail -f $USER9$ -t $CONTACTEMAIL$ -s "mail.server.com:587" -o tls=yes -xu $USER9$ -xp $USER10$ -l /var/log/sendemail.log
}