I have an issue similar to
https://support.nagios.com/forum/viewtopic.php?f=7&t=25449&start=20similar%20issue%20to%20this with one service check I added recently only sending alert notifications as attachments in Nagios Core v3.x.x (old, I know). It's the first Windows log service check I've setup (it's from the Windows event logs specifically - the existing checks are all Linux with a few basic Windows non-log monitoring ones) and I can see a special character in the .bin attachment that I suspect is causing the mail program to send the alert as an attachment (^H - control code for a backspace). The notification text with the control code is within the $SERVICEOUTPUT$ macro and the comment lines above the "illegal_macro_output_chars" setting in nagios.cfg make me think the following change is required, so I tried updating the following in the nagios.cfg from ...:
- Code: Select all
illegal_macro_output_chars=`~$&|'"<>
to
- Code: Select all
illegal_macro_output_chars=`~$&|'"<>^H
And note in vim, to add the "^H" control code I push CTRL-V followed by BACKSPACE to add the control code itself into nagios.cfg. Restarted Nagios with the change, and there's no change with the email alert still arriving as a .bin file attachment. Is there something I'm missing? I can't see any other control codes in the file but I'm happy to add more than needed to get it working (or to at least identify the control code causing this).