Page 2 of 3

Re: No alerts going out from Nagios

Posted: Tue May 24, 2016 5:06 pm
by rkennedy
rkennedy wrote: Sometimes notifications stop working because SQL crashes, try running /usr/local/nagiosxi/scripts/repair_databases.sh to see if that clears it up.
Did rrunning this output anything?

Looking at your profile, I am seeing this in your apache logs -

Code: Select all

[Tue May 24 16:53:42.206072 2016] [:error] [pid 16390] [client ::1:59553] PHP Warning:  mysql_pconnect(): Link to server lost, unable to reconnect in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Tue May 24 16:53:42.206323 2016] [:error] [pid 16390] [client ::1:59553] PHP Notice:  Undefined variable: result in /usr/local/nagiosxi/html/includes/db.inc.php on line 249
[Tue May 24 16:53:42.246134 2016] [:error] [pid 16390] [client ::1:59553] PHP Warning:  mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Tue May 24 16:53:42.246243 2016] [:error] [pid 16390] [client ::1:59553] PHP Notice:  Undefined variable: result in /usr/local/nagiosxi/html/includes/db.inc.php on line 249
[Tue May 24 16:53:42.295400 2016] [:error] [pid 16390] [client ::1:59553] PHP Warning:  mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Tue May 24 16:53:42.295449 2016] [:error] [pid 16390] [client ::1:59553] PHP Notice:  Undefined variable: result in /usr/local/nagiosxi/html/includes/db.inc.php on line 249
I suspect this has to do with it not working since SQL is unable to connect at times.

Re: No alerts going out from Nagios

Posted: Tue May 24, 2016 5:14 pm
by dfmco
There are a lot of entries like this one:
- recovering (with sort) MyISAM-table 'nagios_commands.MYI'
Data records: 124
- Fixing index 1
- Fixing index 2

So does that mean it is fixing things or is there some other bit of info I should be looking for?

Re: No alerts going out from Nagios

Posted: Tue May 24, 2016 6:03 pm
by dfmco
So at some point the nagiosadmin started getting alerts but my ID ([email protected]) is still not getting the alerts. I tried forcing the custom notification in case it was an issue with my ID but that did not work either.

Re: No alerts going out from Nagios

Posted: Tue May 24, 2016 6:51 pm
by Box293
dfmco wrote:There are a lot of entries like this one:
- recovering (with sort) MyISAM-table 'nagios_commands.MYI'
Data records: 124
- Fixing index 1
- Fixing index 2

So does that mean it is fixing things or is there some other bit of info I should be looking for?
This is OK. What you are looking for is errors like "Cannot repair xxx due to yyy".
dfmco wrote:So at some point the nagiosadmin started getting alerts but my ID ([email protected]) is still not getting the alerts. I tried forcing the custom notification in case it was an issue with my ID but that did not work either.
Is [email protected] a user in XI, or just a contact?

Re: No alerts going out from Nagios

Posted: Tue May 24, 2016 7:57 pm
by dfmco
There were no repair errors and dflick is a user and a contact (I selected the contact when setting up)

Re: No alerts going out from Nagios

Posted: Tue May 24, 2016 8:35 pm
by Box293
Can you go to:

Admin > Users > Manage Users
Edit the user dflick
Send us a screenshot of this page
Click Cancel

Click the Masquerade As icon (eyeball) for dflick
Click Continue
Now you are logged in as dflick
Click the username in the top right corner
Under Notification Options click Notification Methods
Are notifications enabled?

Go into CCM
Alerting > Contacts
Click the Disk icon in the actions pane for dflick
Paste the text config here

Re: No alerts going out from Nagios

Posted: Tue May 24, 2016 9:18 pm
by dfmco
receive alerts via email is checked.

Re: No alerts going out from Nagios

Posted: Tue May 24, 2016 10:52 pm
by Box293
Go into CCM
Alerting > Contacts
Click the Disk icon in the actions pane for dflick
Paste the text config here for the contact dflick

Re: No alerts going out from Nagios

Posted: Tue May 24, 2016 11:10 pm
by dfmco
###############################################################################
#
# Contact configuration file
#
# Created by: Nagios Core Config Manager 2.5.2
# Date: 2016-05-24 23:10:28
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define contact {
contact_name dflick
alias Daniel Flick
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r,f,s
service_notification_options c,r,s
email [email protected]
use xi_contact_generic
}

define contact {
contact_name nagiosadmin
alias Nagios Administrator
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r,f,s,
service_notification_options c,r,s,
host_notification_commands xi_host_notification_handler
service_notification_commands xi_service_notification_handler
email [email protected]
use xi_contact_generic
}

###############################################################################
#
# Contact configuration file
#
# END OF FILE
#
###############################################################################

Re: No alerts going out from Nagios

Posted: Tue May 24, 2016 11:13 pm
by dfmco
I am finding that this server is ABYSMALLY slow. I have an Identical server that I did a restore to and I will work on that one going forward and rebuild the one we have been working on. I think the server has some issues.