Page 1 of 1

Host and Service Notification emails aren't being sent

Posted: Thu Nov 09, 2017 5:38 pm
by dmurrell
Hi,

This is essentially a duplicate of this topic: https://support.nagios.com/forum/viewto ... 16&t=46268

We're running 5.4.11 on RHEL7. Was previously on 5.4.8, but as of the upgrade, it stopped sending emails. Test emails work fine.

From the fast resolution forum post:
>Are there special configurations on your system, ie; is Gnome installed? Are you using a proxy? Are you using SSL?
No X, no gnome, just straight forward headless RHEL7 64bit, connected and getting updates from RHSM. Running on vmware. We do have SSL enabled, but that along with notifications worked fine before the upgrade.

I have the profile.zip, but its got quite a lot of install specific stuff in it, happy to DM it to a admin though.

I think the problem is possibly this that pops up in the event handler log: /usr/local/nagiosxi/var/event_handler.log

Code: Select all

    <p><pre>SQL Error [nagiosxi] : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '10:59:32),NOW(),'0')' at line 1</pre></p>
DELETED LOCKFILE '/usr/local/nagiosxi/var/event_handler.lock'
EVENT HANDLER EXITING
The eventman.log has just this in it, regardless of if an event happens:

Code: Select all

[root@nagiosxi-prod var]# tail -f /usr/local/nagiosxi/var/eventman.log
PROCESSED 0 EVENTS
.....................
PROCESSED 0 EVENTS
...................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
.....................
PROCESSED 0 EVENTS
..........
If I cause a critical event (like filling up a home share), it shows up in the service notifications, and says it has sent an email.

As per the previous topic, I've tried reruning the upgrade, and have rebooted just to check. I've also run the db repair script as per /usr/local/nagiosxi/scripts/repair_databases.sh, and while it fixed a bunch of stuff - it was ultimately successful:

Code: Select all

- recovering (with sort) MyISAM-table 'xi_users.MYI'
Data records: 97
- Fixing index 1
- Fixing index 2
~

===============
REPAIR COMPLETE
===============

=======================
nagios database repair succeeded
nagiosql database repair succeeded
nagiosxi database repair succeeded

Re: Host and Service Notification emails aren't being sent

Posted: Fri Nov 10, 2017 10:32 am
by kyang
Can I ask when did you upgrade to 5.4.11 was? Something similar happened in another thread. https://support.nagios.com/forum/viewto ... =6&t=46277
<p><pre>SQL Error [nagiosxi] : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '10:59:32),NOW(),'0')' at line 1</pre></p>
DELETED LOCKFILE '/usr/local/nagiosxi/var/event_handler.lock'
EVENT HANDLER EXITING
There was a packaging error in an early release of 5.4.11. This has been fixed. You should re-download 5.4.11 and just re-run the upgrade over what you have and see if that resolves the issue. Make sure you run the ./upgrade and not the ./fullinstall.

You can run these commands through the terminal of your XI Server. (They are separate commands)

You should save a backup just in case. (There's a link in the documentation)

Code: Select all

cd /tmp
rm -rf nagiosxi xi*.tar.gz
wget http://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
tar xzf xi-latest.tar.gz
cd nagiosxi
./upgrade

The same steps are listed in our documentation in the "Manual Download" section.
https://assets.nagios.com/downloads/nag ... 1510240405

Let us know if this fixes your issue.