Page 1 of 1
SMTP Settings question
Posted: Tue Oct 31, 2017 1:18 pm
by rba
When the SMTP settings are saved in the GUI of nagiosxi, what file are they written to?
Re: SMTP Settings question
Posted: Tue Oct 31, 2017 2:30 pm
by kyang
These settings are stored in the database. Is there any particular reason you wanted this information?
Re: SMTP Settings question
Posted: Tue Oct 31, 2017 3:12 pm
by rba
Nagios stopped sending mail after it was shut down abruptly.
The Mail Settings web page looked good. All the info was there.
After some time looking at this and not seeing any reason that mail shouldn't be sending I clicked on the 'update settings' button on the Mail Settings page, which fixed it.
It'd be nice to see what is actually in the database if that can differ from what's in the gui.
Is there some documentation around what is in the database and what's in config files?
Is there a way to query the database?
Thanks
Re: SMTP Settings question
Posted: Tue Oct 31, 2017 4:04 pm
by npolovenko
Hello,
@rba.
After some time looking at this and not seeing any reason that mail shouldn't be sending I clicked on the 'update settings' button on the Mail Settings page, which fixed it.
Usually, when you click on update settings, XI runs restart commands under the hood. Such as:
Code: Select all
service nagios restart
service httpd restart
So if XI got shut down incorrectly it is very likely that MYSQL needed to be restarted to continue normal operation.
As far as searching the database we do not encourage our users to manually modify or do anything with database entries. We've had too many incidents in the past where a database would get damaged by wrong commands from the user's side. And it's hard to provide technical support for that kind of cases. Nagios GUI, on the other hand, provides a safe environment to make changes in Nagios database.
As far as config files, that would really depend on kind of issue you're facing. You can go to /usr/local/nagios/etc/hosts/ and you can see if notifications are enabled for the particular host. But if emails suddenly stop coming we'd probably check if mysql is running with
And there's also a way to send a test email through the GUI interface.