Page 3 of 3

Re: GUI Issues - Applying updates and System Status info

Posted: Wed Mar 09, 2016 1:22 pm
by tgriep
Since this is a fresh install of 5.2.3 of XI, the Postgress database is not used anymore.
To repair the mysql database, run the following command.

Code: Select all

mysqlcheck -f -r -u root -pnagiosxi --databases nagios nagiosql nagiosxi
This will repair all of the MYSQL databases that XI uses.
After this, let us know of you are still having issues applying the configuration.

Re: GUI Issues - Applying updates and System Status info

Posted: Wed Mar 09, 2016 3:58 pm
by gazoo1997
Wanted to post this here before trying the "Apply Configuration" via the GUI. The corrupt file format issue could be the reason why the System Commands are not getting run and there is no live system data available.

mysqlcheck -f -r -u root -pnagiosxi --databases nagios nagiosql nagiosxi
nagios.nagios_acknowledgements OK
nagios.nagios_commands OK
nagios.nagios_commenthistory OK
nagios.nagios_comments OK
nagios.nagios_configfiles OK
nagios.nagios_configfilevariables OK
nagios.nagios_conninfo OK
nagios.nagios_contact_addresses OK
nagios.nagios_contact_notificationcommands OK
nagios.nagios_contactgroup_members OK
nagios.nagios_contactgroups OK
nagios.nagios_contactnotificationmethods OK
nagios.nagios_contactnotifications OK
nagios.nagios_contacts OK
nagios.nagios_contactstatus OK
nagios.nagios_customvariables OK
nagios.nagios_customvariablestatus OK
nagios.nagios_dbversion OK
nagios.nagios_downtimehistory OK
nagios.nagios_eventhandlers OK
nagios.nagios_externalcommands OK
nagios.nagios_flappinghistory OK
nagios.nagios_host_contactgroups OK
nagios.nagios_host_contacts OK
nagios.nagios_host_parenthosts OK
nagios.nagios_hostchecks OK
nagios.nagios_hostdependencies OK
nagios.nagios_hostescalation_contactgroups OK
nagios.nagios_hostescalation_contacts OK
nagios.nagios_hostescalations OK
nagios.nagios_hostgroup_members OK
nagios.nagios_hostgroups OK
nagios.nagios_hosts OK
nagios.nagios_hoststatus OK
nagios.nagios_instances OK
nagios.nagios_logentries OK
nagios.nagios_notifications OK
nagios.nagios_objects OK
nagios.nagios_processevents OK
nagios.nagios_programstatus OK
nagios.nagios_runtimevariables OK
nagios.nagios_scheduleddowntime OK
nagios.nagios_service_contactgroups OK
nagios.nagios_service_contacts OK
nagios.nagios_service_parentservices OK
nagios.nagios_servicechecks OK
nagios.nagios_servicedependencies OK
nagios.nagios_serviceescalation_contactgroups OK
nagios.nagios_serviceescalation_contacts OK
nagios.nagios_serviceescalations OK
nagios.nagios_servicegroup_members OK
nagios.nagios_servicegroups OK
nagios.nagios_services OK
nagios.nagios_servicestatus OK
nagios.nagios_statehistory OK
nagios.nagios_systemcommands
Error : Incorrect file format 'nagios_systemcommands'
error : Corrupt
nagios.nagios_timedeventqueue OK
nagios.nagios_timedevents OK

Re: GUI Issues - Applying updates and System Status info

Posted: Wed Mar 09, 2016 5:40 pm
by lmiltchev
Run:

Code: Select all

echo 'repair table nagios_systemcommands use_frm;' | mysql -t -u root -pnagiosxi nagios
service mysqld restart
Check the mysqld.log for errors:

Code: Select all

tail /var/log/mysqld.log
If you don't see any errors, try applying configuration again.

Let me know if this helped. Thank you!

Re: GUI Issues - Applying updates and System Status info

Posted: Thu Mar 10, 2016 5:42 am
by gazoo1997
I was able to "Apply Configuration" from the GUI successfully after running the suggested mysql command and restarting mysql.
ApplyConfig.png
There don't appear to be anymore errors in the mysqld.log however a tail of /usr/local/nagiosxi/var/cmdsubsys.log while the "Apply Configuration" still indicates that there are issues.

Can the same mysql command be run for xi_sysstat?

0K .......... .......... .......... ..... 904K=0.04s

2016-03-10 10:32:55 (904 KB/s) - “nagiosql.login” saved [36533]

/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=*********' -O nagiosql.loginLOGIN SUCCESSFUL!
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2016-03-10 10:32:55-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1, ::1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.export.monitoring”

0K .......... .... 7.82K=1.9s

2016-03-10 10:32:57 (7.82 KB/s) - “nagiosql.export.monitoring” saved [14824]

WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 2139 services.
Checked 274 hosts.
Checked 9 host groups.
Checked 3 service groups.
Checked 3 contacts.
Checked 3 contact groups.
Checked 135 commands.
Checked 17 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 274 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 17 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
OUTPUT=Starting nagios: done.
RETURNCODE=0
SQL: SQL Error [nagiosxi] :</b> Incorrect file format 'xi_sysstat' SQL: SQL Error [nagiosxi] :</b> Incorrect file format 'xi_sysstat'. SQL: SQL Error [nagiosxi] :</b> Incorrect file format 'xi_sysstat' SQL: SQL Error [nagiosxi] :</b> Incorrect file format 'xi_sysstat'.tail: cmdsubsys.log: file truncated
SQL: SQL Error [nagiosxi] :</b> Incorrect file format 'xi_sysstat' SQL: SQL Error [nagiosxi] :</b> Incorrect file format 'xi_sysstat'
PROCESSED 1 COMMANDS
tail: cmdsubsys.log: file truncated
SQL: SQL Error [nagiosxi] :</b> Incorrect file format 'xi_sysstat' SQL: SQL Error [nagiosxi] :</b> Incorrect file format 'xi_sysstat'. SQL: SQL Error [nagiosxi] :</b> Incorrect file format 'xi_sysstat' SQL: SQL Error [nagiosxi] :</b> Incorrect file format 'xi_sysstat'. SQL: SQL Error [nagiosxi] :</b> Incorrect file format 'xi_sysstat' SQL:

Re: GUI Issues - Applying updates and System Status info

Posted: Thu Mar 10, 2016 6:03 am
by gazoo1997
Woot Woot! All systems go!!!

After fixing the nagios_systemsubcommands table I ran the mysqlcheck again.

mysqlcheck -f -r -u root -pnagiosxi --databases nagios nagiosql nagiosxi
nagios.nagios_acknowledgements OK
nagios.nagios_commands OK
nagios.nagios_commenthistory OK
.
.
nagios.nagios_systemcommands OK
.
.
nagiosxi.xi_sysstat
Error : Incorrect file format 'xi_sysstat'
error : Corrupt
nagiosxi.xi_usermeta OK
nagiosxi.xi_users OK

Ran the repair for xi_sysstat:

echo 'repair table xi_sysstat use_frm;' | mysql -t -u root -pnagiosxi nagiosxi
+---------------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+---------------------+--------+----------+----------+
| nagiosxi.xi_sysstat | repair | status | OK |
+---------------------+--------+----------+----------+

Another go at the mysqlcheck produced all "OK"....

All System Status issues are resolved and Apply Configuration is working correctly.

Thanks to all who provided their support for these issues.

Re: GUI Issues - Applying updates and System Status info

Posted: Thu Mar 10, 2016 10:08 am
by lmiltchev
Another go at the mysqlcheck produced all "OK"....

All System Status issues are resolved and Apply Configuration is working correctly.

Thanks to all who provided their support for these issues.
I am glad to hear that! Can we mark this issue as "resolved" then, and lock the thread? Thank you!

Re: GUI Issues - Applying updates and System Status info

Posted: Mon Mar 14, 2016 1:05 pm
by gazoo1997
Lock it up!

Thanks again

Re: GUI Issues - Applying updates and System Status info

Posted: Mon Mar 14, 2016 1:15 pm
by rkennedy
Glad to see this resolved!

Locking this up -- feel free to make a new thread if you need any assistance in the future.