Windows Nagios notification sent as a .bin file

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
dhhh
Posts: 8
Joined: Thu Mar 18, 2021 5:07 am

Windows Nagios notification sent as a .bin file

Post by dhhh »

I have an issue similar to https://support.nagios.com/forum/viewto ... 0to%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).
SandraLewisFrin
Posts: 15
Joined: Fri Feb 18, 2022 4:44 am

Re: Windows Nagios notification sent as a .bin file

Post by SandraLewisFrin »

set the debug level to 32 in nagios.cfg and restart. Then watch the logs. I just went through this. In my case, Nagios wasn't sending the alerts because the thresholds for notifications hadn't been voojio omegle met.
Last edited by SandraLewisFrin on Tue Apr 05, 2022 5:22 am, edited 1 time in total.
dhhh
Posts: 8
Joined: Thu Mar 18, 2021 5:07 am

Re: Windows Nagios notification sent as a .bin file

Post by dhhh »

I set the debug level to 32, and the alert was finally triggered recently but it doesn't show ANY special characters at all in the log (and it doesn't show any different output in the log at all compared to when the debug level was on its default level). Have set it to "-1" (i.e. "Everything") for now to see if that provides any more without logging too much.
Locked