Hello,
For our Nagios 4.0.8 email notification we use nagios_mail.php(Extended Nagios Notification Mail author Otto Berger) that require to enable environment macros.
We have a problem with CONTACTMAIL Macro which always contains same mail address.
Same bug has already been described.
https://tracker.nagios.org/view.php?id=575
Does anyone know how I can apply the patch?
Issue with contact macros in environment variables
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Issue with contact macros in environment variables
Download your source:
Untar:
CD into directory:
Patch the file:
Recompile/Reinstall
https://assets.nagios.com/downloads/nag ... l#nagios3x
I'll see about getting this into 4.10 if it isn't already.
Code: Select all
wget https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.0.8.tar.gzCode: Select all
tar -xzvf Nagios-4.0.8.tar.gzCode: Select all
cd nagioscore-nagios-4.0.8Code: Select all
patch < /path/to/your/file.patchhttps://assets.nagios.com/downloads/nag ... l#nagios3x
I'll see about getting this into 4.10 if it isn't already.
Re: Issue with contact macros in environment variables
Hi jdalrymple,jdalrymple wrote:
Patch the file:Code: Select all
patch < /path/to/your/file.patch
Thanks for yout answer, but it dosn’t work for me.
No output, macros.c wasn’t changed.
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Issue with contact macros in environment variables
Sorry, my bad. On the 4.0.8 source you'll have to explicitly define the path to the file:
Code: Select all
[jdalrymple@localhost nagioscore-nagios-4.0.8]$ patch common/macros.c < ~/patch
patching file common/macros.c
Hunk #1 succeeded at 3172 (offset -24 lines).
Hunk #2 succeeded at 3380 (offset -5 lines).Re: Issue with contact macros in environment variables
thank you very much, it's seems to work.
Re: Issue with contact macros in environment variables
Glad we could help.uragusan wrote:thank you very much, it's seems to work.
Thank you.
Former Nagios Employee.
me.
me.