Page 2 of 4

Re: Corrupted tables now no notifications

Posted: Mon Jan 09, 2017 3:05 pm
by tcanthonyii
[root@NagiosXIMon ~]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = localhost
inet_protocols = all
mail_owner = postfix
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
You have new mail in /var/spool/mail/root
[root@NagiosXIMon ~]#

Re: Corrupted tables now no notifications

Posted: Mon Jan 09, 2017 3:30 pm
by dwhitfield
It looks like in the past some people have resolved these issues by rebooting. We can go through and reboot service by service (we already reloaded postfix), but it might be quicker to just reboot the server.

If you don't want to reboot the whole server, what's your OS version? I'm guessing 6 based on your postfix version.

Also, please post the output of the following two commands:

Code: Select all

service mysql status
mysql -u root -p nagiosxi
You may need to change the mysql username and password depending on how you have the db set up.

Re: Corrupted tables now no notifications

Posted: Mon Jan 09, 2017 3:33 pm
by tcanthonyii
[root@NagiosXIMon ~]# service mysql status
mysql: unrecognized service
[root@NagiosXIMon ~]# mysql -u root -p nagiosxi
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)



I have rebooted 3 or 4 times to no avail.

Re: Corrupted tables now no notifications

Posted: Mon Jan 09, 2017 3:53 pm
by tcanthonyii
I am on 6.8 final.

Re: Corrupted tables now no notifications

Posted: Mon Jan 09, 2017 3:57 pm
by dwhitfield
Please run the following two commands

Code: Select all

echo "use nagios;repair table nagios_systemcommands use_frm;" | mysql -pnagiosxi
echo "use nagios;repair table nagios_statehistory use_frm;" | mysql -pnagiosxi
Apologies, the last status check should have been service mysqld status. I tested this command on CentOS 6.8.

When you ran mysql -u root -p nagiosxi, did you use nagiosxi as the password when it asked? If you changed the default, did you use the correct password?

Can you post a screenshot of the 'Manage Email Settings' page? I'd like to take a look at your settings. Also please post tail /usr/local/nagiosxi/tmp/phpmailer.log for us to look at. Thanks!

Re: Corrupted tables now no notifications

Posted: Mon Jan 09, 2017 4:01 pm
by rkennedy
Please post a screenshot of your Admin -> Manage Email Settings page for us to review.

Also, from your profile I noticed a few tables we should be able to manually repair. Please run the following -

Code: Select all

echo "use nagios;repair table nagios_customvariablestatus use_frm;" | mysql -uroot -pnagiosxi
echo "use nagiosxi;repair table xi_sysstat use_frm;" | mysql -uroot -pnagiosxi
echo "use nagiosxi;repair table xi_events use_frm;" | mysql -uroot -pnagiosxi
This may get them back to firing out properly - if not, please send over another profile once again for us to review.

Re: Corrupted tables now no notifications

Posted: Mon Jan 09, 2017 5:01 pm
by tcanthonyii
[root@NagiosXIMon ~]# echo "use nagios;repair table nagios_customvariablestatus use_frm;" | mysql -uroot -pnagiosxi
Table Op Msg_type Msg_text
nagios.nagios_customvariablestatus repair status OK
You have new mail in /var/spool/mail/root
[root@NagiosXIMon ~]# echo "use nagiosxi;repair table xi_sysstat use_frm;" | mysql -uroot -pnagiosxi
Table Op Msg_type Msg_text
nagiosxi.xi_sysstat repair status OK
[root@NagiosXIMon ~]# echo "use nagiosxi;repair table xi_events use_frm;" | mysql -uroot -pnagiosxi
Table Op Msg_type Msg_text
nagiosxi.xi_events repair warning Number of rows changed from 0 to 1110
nagiosxi.xi_events repair status OK

Re: Corrupted tables now no notifications

Posted: Mon Jan 09, 2017 5:06 pm
by tcanthonyii
Test email goes out OK FYI.

Re: Corrupted tables now no notifications

Posted: Tue Jan 10, 2017 8:32 am
by tcanthonyii
Is there any way we can get this working today? Maybe with a screen share? It's been 3 days without notifications.

Re: Corrupted tables now no notifications

Posted: Tue Jan 10, 2017 9:18 am
by rkennedy
Please post your php mailer log for us to review /usr/local/nagiosxi/tmp/phpmailer.log - this should be logging what the issue is on why your mail is failing. There may be more tables we need to repair as well, what is the full output from running /usr/local/nagiosxi/scripts/repair_databases.sh?

Depending on the errors you see running it, you'll want to run through page #2 here - https://assets.nagios.com/downloads/nag ... tabase.pdf

This should fix it up for you - I don't think a remote is needed at this time, but if you'd like to move it into a ticket feel free to email [email protected]. This doesn't guarantee a remote session though.