backslash in plugin response
Posted: Wed Jul 25, 2012 3:05 am
Hi everyone!
I'm a nagios happy user from Italy.
My centos server is running nagios core v3.4.1 and i'm using check_disk_smb plugin to check share free disk space. At some point in past plugin output change from:
to:
additional backslash in response message create a problem with service notification command because printf "%b" takes "\\10." and convert it as octal code (i think) and sendmail sent it as attachment.
Here is my command configuration:
modify plugin's code doesn't seem the definitive solution.
There's a way to prevent this kind of problem in nagios side?
Thank you.
Bye
Debe
I'm a nagios happy user from Italy.
My centos server is running nagios core v3.4.1 and i'm using check_disk_smb plugin to check share free disk space. At some point in past plugin output change from:
Code: Select all
Disk ok - 3.8G (1%) free on 10.41.186.10 share: DatiCode: Select all
Only 4.46G (1%) free on \\10.41.186.10\DatiHere is my command configuration:
Code: Select all
define command{
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n\n$NOTIFICATIONCOMMENT$" | /bin/mail -s"** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}There's a way to prevent this kind of problem in nagios side?
Thank you.
Bye
Debe