Page 1 of 1

Multiple oddities on server

Posted: Tue May 07, 2019 2:45 pm
by hbouma
I have a fresh install server of Nagios XI 5.6.1 on Red Hat 7 64bit VM's with offloaded databases.

When I try to apply a configuration, it tells me that there are invalid characters on usernames (quotation marks). Looking at the config files, the usernames don't have a quotation mark. If I delete the config files, write the config files, verify the files and restart nagios, then attempt to apply the config, I get the same error.

When I attempt to run a reconfigure_nagios.sh, I get the following errors:

Code: Select all

--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
  - Importing: /usr/local/nagios/etc/import/recurringdowntime.cfg .. ERROR
   Table for import definition 'schedule' is not available!
When I try to run a repair_databases I get errors (Passwords, usernames and IP's hidden):

Code: Select all

$ ./repair_databases.sh
DATABASE: nagios
TABLE:
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                       OK
nagios.nagios_timedeventqueue                      OK
nagios.nagios_timedevents                          OK
nagios.nagios_timeperiod_timeranges                OK
nagios.nagios_timeperiods                          OK
Issued remote command 'mysqlcheck -f -r -u -p -h  --port=3306 --databases nagios'
DATABASE: nagiosql
TABLE:
nagiosql.tbl_command
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_contact
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_contactgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_contacttemplate
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_domain
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_host
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_hostdependency
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_hostescalation
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_hostextinfo
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_hostgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_hosttemplate
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_info
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkContactToCommandHost
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkContactToCommandService
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkContactToContactgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkContactToContacttemplate
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkContactToVariabledefinition
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkContactgroupToContact
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkContactgroupToContactgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkContacttemplateToCommandHost
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkContacttemplateToCommandService
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkContacttemplateToContactgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkContacttemplateToContacttemplate
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkContacttemplateToVariabledefinition
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostToContact
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostToContactgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostToHost
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostToHostgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostToHosttemplate
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostToVariabledefinition
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostdependencyToHost_DH
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostdependencyToHost_H
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostdependencyToHostgroup_DH
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostdependencyToHostgroup_H
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostescalationToContact
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostescalationToContactgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostescalationToHost
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostescalationToHostgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostgroupToHost
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHostgroupToHostgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHosttemplateToContact
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHosttemplateToContactgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHosttemplateToHost
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHosttemplateToHostgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHosttemplateToHosttemplate
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkHosttemplateToVariabledefinition
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServiceToContact
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServiceToContactgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServiceToHost
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServiceToHostgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServiceToServicegroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServiceToServicetemplate
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServiceToVariabledefinition
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicedependencyToHost_DH
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicedependencyToHost_H
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicedependencyToHostgroup_DH
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicedependencyToHostgroup_H
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicedependencyToService_DS
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicedependencyToService_S
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicedependencyToServicegroup_DS
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicedependencyToServicegroup_S
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServiceescalationToContact
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServiceescalationToContactgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServiceescalationToHost
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServiceescalationToHostgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServiceescalationToService
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServiceescalationToServicegroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicegroupToService
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicegroupToServicegroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicetemplateToContact
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicetemplateToContactgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicetemplateToHost
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicetemplateToHostgroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicetemplateToServicegroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicetemplateToServicetemplate
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkServicetemplateToVariabledefinition
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_lnkTimeperiodToTimeperiod
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_logbook
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_mainmenu
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_permission
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_permission_inactive
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_service
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_servicedependency
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_serviceescalation
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_serviceextinfo
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_servicegroup
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_servicetemplate
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_session
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_session_locks
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_settings
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_submenu
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_timedefinition
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_timeperiod
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_user
note     : The storage engine for the table doesn't support repair
nagiosql.tbl_variabledefinition
note     : The storage engine for the table doesn't support repair
Issued remote command 'mysqlcheck -f -r -u -p -h --port=3306 --databases nagiosql'
DATABASE: nagiosxi
TABLE:
nagiosxi.xi_auditlog
note     : The storage engine for the table doesn't support repair
nagiosxi.xi_auth_tokens
note     : The storage engine for the table doesn't support repair
nagiosxi.xi_cmp_trapdata
note     : The storage engine for the table doesn't support repair
nagiosxi.xi_cmp_trapdata_log
note     : The storage engine for the table doesn't support repair
nagiosxi.xi_commands
note     : The storage engine for the table doesn't support repair
nagiosxi.xi_eventqueue
note     : The storage engine for the table doesn't support repair
nagiosxi.xi_events
note     : The storage engine for the table doesn't support repair
nagiosxi.xi_incidents
note     : The storage engine for the table doesn't support repair
nagiosxi.xi_meta
note     : The storage engine for the table doesn't support repair
nagiosxi.xi_mibs
note     : The storage engine for the table doesn't support repair
nagiosxi.xi_options
note     : The storage engine for the table doesn't support repair
nagiosxi.xi_sessions
note     : The storage engine for the table doesn't support repair
nagiosxi.xi_sysstat
note     : The storage engine for the table doesn't support repair
nagiosxi.xi_usermeta
note     : The storage engine for the table doesn't support repair
nagiosxi.xi_users
note     : The storage engine for the table doesn't support repair
Issued remote command 'mysqlcheck -f -r -u  -p -h  --port=3306 --databases nagiosxi'

Re: Multiple oddities on server

Posted: Tue May 07, 2019 3:11 pm
by scottwilkerson
Are there files in here?

Code: Select all

ls -l /usr/local/nagios/etc/import/
If so I would recommend removing them and trying to apply configuration again

Re: Multiple oddities on server

Posted: Tue May 07, 2019 3:14 pm
by hbouma
There was a file (recurringdowntime). Even when I remove the file and reapply, I get the same errors.

Re: Multiple oddities on server

Posted: Tue May 07, 2019 3:42 pm
by scottwilkerson
hbouma wrote:There was a file (recurringdowntime). Even when I remove the file and reapply, I get the same errors.
Lets run the following and report what is returned

Code: Select all

rm -f /usr/local/nagios/etc/import/*
cd /usr/local/nagiosxi/scripts/
./reconfigure_nagios.sh

Re: Multiple oddities on server

Posted: Wed May 08, 2019 6:43 am
by hbouma
Oddly, I can now apply a configuration after running these commands, but I still feel like Nagios XI didn't install properly, even though it says it did. For instance, I am missing multiple files in the /usr/local/nagiosxi/scripts folder, such as the reconfigure_nagios.sh (I had to copy it from another server to run the commands you gave me).

Code: Select all

$ rm -f /usr/local/nagios/etc/import/*
07:38 AM SERVERNAME root [/usr/local/nagiosxi/scripts]
$ ll /usr/local/nagios/etc/import/
total 8.0K
drwxrwxr-x. 2 apache nagios 4.0K May  8 07:37 .
drwxrwxr-x. 7 apache nagios 4.0K May  7 15:17 ..
07:38 AM SERVERNAME root [/usr/local/nagiosxi/scripts]
$ cd /usr/local/nagiosxi/scripts/
07:38 AM SERVERNAME root [/usr/local/nagiosxi/scripts]
$ ./reconfigure_nagios.sh

--- reset_config_perms.sh ------------
> Setting script permissions
> Setting CCM script permissions
> Setting special script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting Nagios XI config permissions
> Setting NOM checkpoint user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------

--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
  No files to import
--------------------------------------

--- ccm_export.php -------------------
> Writing CCM configuration to Nagios files
  Finished writing out configuraton
--------------------------------------

--------------------------------------
> Verifying configuration with Nagios Core
> Output:
Nagios Core 4.4.3
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-01-15
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 11 services.
        Checked 1 hosts.
        Checked 164 host groups.
        Checked 82 service groups.
        Checked 159 contacts.
        Checked 95 contact groups.
        Checked 152 commands.
        Checked 164 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 1 hosts
        Checked 0 service dependencies
        Checked 0 host dependencies
        Checked 164 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
> Return Code: 0
--------------------------------------
Here is a list of my files in /usr/local/nagiosxi/scripts for example

Code: Select all

drwxr-xr-x.  4 root   nagios 4.0K May  8 07:38 .
drwxr-xr-x  11 root   nagios 4.0K Mar 25 10:32 ..
drwxr-xr-x.  3 nagios nagios 4.0K Mar 25 10:32 automation
-r-xr-x---.  1 root   nagios 7.6K May  7 15:17 backup_xi.sh
-r-xr-x---.  1 nagios nagios 8.0K May  7 15:17 ccm_delete_object.php
-r-xr-x---.  1 nagios nagios 1.1K May  7 15:17 ccm_export.php
-r-xr-x---.  1 nagios nagios 1.5K May  7 15:17 ccm_import.php
-r-xr-x---.  1 nagios nagios 3.2K May  7 15:17 ccm_snapshot.sh
-r-xr-x---.  1 root   nagios 1.8K May  7 15:17 change_timezone.sh
drwxr-xr-x   2 nagios nagios 4.0K May  2 08:20 components
-rwxr-xr-x.  1 nagios nagios 2.8K May  7 15:17 contact_notification_handler.php
-rwxr-xr-x.  1 nagios nagios  266 May  7 15:17 handle_nagioscore_event.php
-rwxr-xr-x.  1 nagios nagios 3.9K May  7 15:17 handle_nagioscore.inc.php
-rwxr-xr-x.  1 nagios nagios  267 May  7 15:17 handle_nagioscore_notification.php
-r-xr-x---.  1 root   nagios 1.3K May  7 15:17 import_xiconfig.php
-rwxr-xr-x   1 nagios nagios  705 May  7 15:17 initialize_mibs.php
-r-xr-x---.  1 root   nagios 3.4K May  7 15:17 manage_services.sh
-r-xr-x---.  1 root   nagios 3.8K May  7 15:17 manage_ssl_config.sh
-rwxr-xr-x.  1 nagios nagios 278K May  7 15:17 nagiosql_defaults.sql
-rwxr-xr-x.  1 nagios nagios  506 May  7 15:17 nom_create_nagioscore_checkpoint_cond.sh
-rwxr-xr-x.  1 nagios nagios  986 May  7 15:17 nom_create_nagioscore_checkpoint.sh
-rwxr-xr-x.  1 nagios nagios  785 May  7 15:17 nom_create_nagioscore_errorpoint.sh
-rwxr-xr-x.  1 nagios nagios  968 May  7 15:17 nom_restore_nagioscore_checkpoint.sh
-rwxr-xr-x.  1 nagios nagios  947 May  7 15:17 nom_restore_nagioscore_checkpoint_specific.sh
-rwxr-xr-x.  1 nagios nagios 4.6K May  7 15:17 nom_trim_checkpoints.sh
-rwxr-xr-x.  1 nagios nagios 7.5K May  7 15:17 nxti_import.php
-rwxr-xr-x.  1 nagios nagios 1.3K May  7 15:17 nxti.php
-rwxr-xr-x.  1 nagios nagios  13K May  7 15:17 parse_core_eventlog.php
-rwxr-xr-x.  1 nagios nagios 6.5K May  7 15:17 patch_ndoutils.php
-rwxr-xr-x   1 nagios nagios  971 May  8 07:38 reconfigure_nagios.sh
-rwxr-xr-x.  1 nagios nagios 4.2K May  7 15:17 remove_historical_data.sh
-r-xr-x---.  1 root   nagios 1.7K May  7 15:17 repair_databases.sh
-rwxr-xr-x.  1 nagios nagios 3.9K May  7 15:17 repairmysql.sh
-r-xr-x---.  1 root   nagios 4.7K May  7 15:17 reset_config_perms.sh
-rwxr-xr-x.  1 nagios nagios 1.9K May  7 15:17 reset_nagiosadmin_password.php
-rwxr-xr-x.  1 nagios nagios 1.9K May  7 15:17 restart_nagios_with_export.sh
-rwxr-xr-x.  1 nagios nagios 4.0K May  7 15:17 restore_defaults.sh
-rwxr-xr-x.  1 nagios nagios  13K May  7 15:17 restore_xi.sh
-rwxr-xr-x.  1 nagios nagios 1.9K May  7 15:17 send_to_auditlog.php
-rwxr-xr-x.  1 nagios nagios 1.4K May  7 15:17 unlock_user_account.php
-rwxr-xr-x.  1 nagios nagios  722 May  7 15:17 update_check.php
-r-xr-x---.  1 root   nagios 2.9K May  7 15:17 upgrade_to_latest.sh

Re: Multiple oddities on server

Posted: Wed May 08, 2019 7:19 am
by scottwilkerson
hbouma wrote:For instance, I am missing multiple files in the /usr/local/nagiosxi/scripts folder, such as the reconfigure_nagios.sh (I had to copy it from another server to run the commands you gave me).
This doesn't sound correct at all, I would re-run the upgrade script, it should copy over ALL of the files required every time the ./upgrade script is run.

https://assets.nagios.com/downloads/nag ... ctions.pdf

Re: Multiple oddities on server

Posted: Wed May 08, 2019 9:05 am
by hbouma
I have re-run the upgrade. Same files appear on this server /usr/local/nagiosxi/scripts, which is fewer than other servers. I cannot tell if this is because the other servers had multiple upgrades from older versions vs this newer server.

I am still seeing errors when attempting to repair the database. Multiple tables show "The storage engine for the table doesn't support repair" as listed in my first post. Is this expected with 5.6.1?

Re: Multiple oddities on server

Posted: Wed May 08, 2019 9:09 am
by scottwilkerson
hbouma wrote:I have re-run the upgrade. Same files appear on this server /usr/local/nagiosxi/scripts, which is fewer than other servers. I cannot tell if this is because the other servers had multiple upgrades from older versions vs this newer server.
this very well could be as we do not delete files from older systems if they are no longer in use
hbouma wrote:I am still seeing errors when attempting to repair the database. Multiple tables show "The storage engine for the table doesn't support repair" as listed in my first post. Is this expected with 5.6.1?
This is normal, as some of the DB tables are Innodb and are skipped (and logged as you are seeing)

Re: Multiple oddities on server

Posted: Wed May 08, 2019 9:20 am
by hbouma
Ok, then I will test the server a bit more to see if I see any additional oddities

Re: Multiple oddities on server

Posted: Wed May 08, 2019 9:33 am
by scottwilkerson
hbouma wrote:Ok, then I will test the server a bit more to see if I see any additional oddities
Sounds good