<br><font size=2 face="Courier New">> For some reason, on the drive letter appears in the Additional Info<br>
> section of the email notifications, not the space left/used, etc...<br>
><br>
> Here is an example email:<br>
[snipped] <br>
> C:</font>
<br>
<br><font size=2 face="sans-serif">Reason for that is the way Nagios pipes the notifications into the commands.</font>
<br><font size=2 face="sans-serif">Since it uses "/usr/bin/printf" to pipe them and "\" escape sequences for the formating,</font>
<br><font size=2 face="sans-serif">the string "C:\ "make /usr/bin/printf bail out with an error. Therefor the output ends right at</font>
<br><font size=2 face="sans-serif">the first occurance of "\ " (note the trailing space).</font>
<br>
<br><font size=2 face="sans-serif">You can try the result at the commandline:</font>
<br>
<br><font size=2 face="sans-serif">[root@SRV00032 root]# /usr/bin/printf "%b" "This is a test.\nIt will show how a backslash with a trailing space breaks /usr/bin/printf.\nBye Bye C:\ \nYou won't see this!"</font>
<br><font size=2 face="sans-serif">This is a test.</font>
<br><font size=2 face="sans-serif">It will show how a backslash with a trailing space breaks /usr/bin/printf.</font>
<br><font size=2 face="sans-serif">Bye Bye C:/usr/bin/printf: \ : invalid escape</font>
<br><font size=2 face="sans-serif">[root@SRV00032 root]#</font>
<br>
<br><font size=2 face="sans-serif">Everything after C: is actually STDERR and not STDOUT, therefor it doesn't get mailed.</font>
<br>
<br><font size=2 face="sans-serif">The question now is: Who is responsible for this?</font>
<br>
<br><font size=2 face="sans-serif">Should Nagios filter things like \ before passing them to the notify-commands?</font>
<br><font size=2 face="sans-serif">Should there be a rule for plugins to not use "\ " in their output?</font>
<br>
<br><font size=2 face="sans-serif">My opinion:</font>
<br><font size=2 face="sans-serif">Nagios uses /usr/bin/printf per default, therefor it should make sure that the output passed</font>
<br><font size=2 face="sans-serif">to it does not break it.</font>
<br>
<br><font size=2 face="sans-serif">regards</font>
<br><font size=2 face="sans-serif"> sash</font>
<br>
<br><font size=2 face="sans-serif">IMPORTANT SIDENOTE: "/usr/bin/printf" is NOT the same as typing "printf" at the command line as</font>
<br><font size=2 face="sans-serif">the latter is a built-in feature of bash! the bash built-in handles misquoted "\"s fine.</font>
<br>
<br><font size=2 face="sans-serif">--------------------------------------------------<br>
Sascha Runschke<br>
Netzwerk Administration<br>
IT-Services<br>
<br>
ABIT AG<br>
Robert-Bosch-Str. 1<br>
40668 Meerbusch<br>
<br>
Tel.:+49 (0) 2150.9153.226<br>
mailto:SRunschke-VuJELsoxrDI@public.gmane.org<br>
<br>
http://www.abit.net<br>
http://www.abit-epos.net<br>
http://www.my-academy.net<br>
--------------------------------------------------<br>
Der Inhalt dieser Email sowie die Anhänge sind ausschließlich für den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser Email oder dessen Vertreter sein sollten, so beachten Sie bitte, daß jede Form der Kenntnisnahme, Veröffentlichung, Vervielfältigung oder Weitergabe des Inhalts dieser Email unzulässig ist. Wir möchten Sie außerdem darauf hinweisen, daß die Kommunikation per Email über das Internet unsicher ist, da fuer unberechtigte Dritte grundsätzlich die Möglichkeit der Kenntnisnahme und Manipulation besteht. Wenn Sie diese Nachricht versehentlich erhalten, informieren Sie bitte den Absender und löschen diese Nachricht mit den Anhängen. Herzlichen Dank<br>
<br>
The information and any attachments contained in this email are intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, reproduction, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. We also like to inform you that communication via email over the internet is insecure because third parties may have the possibility to access and manipulate emails. If you have received the message in error, please advise the sender and delete the message and any attachments. Thank you very much.</font>