SQL Error [nagiosxi]

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
kvijay
Posts: 8
Joined: Tue Oct 27, 2015 3:32 am

SQL Error [nagiosxi]

Post by kvijay »

while i logoin to nagiosxi
getting below errir .

SQL Error [nagiosxi] : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE user_id = 9' at line 3
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SQL Error [nagiosxi]

Post by ssax »

What version of XI are you running?

Please send me a copy of your profile, you can download it from Admin > System Profile > Download Profile button.

If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:

Code: Select all

rm -rf /usr/local/nagiosxi/var/components/profile*​​
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
Then send me the resulting /usr/local/nagiosxi/var/components/profile.zip​ file.​

If the profile script fails, please include the ENTIRE output.

Additionally, please send the output of these commands (as root):
- NOTE: You may need to adjust the -h 127.0.0.1, the -uroot, and -pnagiosxi in the first command if your DB is offloaded to another server and/or you've changed the root mysql password

Code: Select all

echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table
This next command may fail, that's okay, not all systems have postgresql:

Code: Select all

echo "SELECT relname as Table, pg_size_pretty(pg_total_relation_size(relid)) As Size, pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as ExternalSize FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;" | psql nagiosxi nagiosxi
kvijay
Posts: 8
Joined: Tue Oct 27, 2015 3:32 am

Re: SQL Error [nagiosxi]

Post by kvijay »

[root@cbq2-svu-nagxi1 components]# echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table
+--------------------------------------------+------------+
| Table | Size in MB |
+--------------------------------------------+------------+
| nagios_acknowledgements | 0.00 |
| nagios_commands | 0.02 |
| nagios_commenthistory | 7.25 |
| nagios_comments | 0.00 |
| nagios_configfiles | 0.00 |
| nagios_configfilevariables | 0.01 |
| nagios_conninfo | 0.06 |
| nagios_contact_addresses | 0.00 |
| nagios_contact_notificationcommands | 0.04 |
| nagios_contactgroup_members | 0.01 |
| nagios_contactgroups | 0.00 |
| nagios_contactnotificationmethods | 1.44 |
| nagios_contactnotifications | 1.53 |
| nagios_contacts | 0.01 |
| nagios_contactstatus | 0.01 |
| nagios_customvariables | 0.01 |
| nagios_customvariablestatus | 0.01 |
| nagios_dbversion | 0.00 |
| nagios_downtimehistory | 0.35 |
| nagios_eventhandlers | 0.00 |
| nagios_externalcommands | 0.00 |
| nagios_flappinghistory | 2.51 |
| nagios_host_contactgroups | 0.01 |
| nagios_host_contacts | 0.00 |
| nagios_host_parenthosts | 0.00 |
| nagios_hostchecks | 0.00 |
| nagios_hostdependencies | 0.00 |
| nagios_hostescalation_contactgroups | 0.00 |
| nagios_hostescalation_contacts | 0.00 |
| nagios_hostescalations | 0.00 |
| nagios_hostgroup_members | 0.01 |
| nagios_hostgroups | 0.00 |
| nagios_hosts | 0.02 |
| nagios_hoststatus | 0.05 |
| nagios_instances | 0.00 |
| nagios_logentries | 2086.79 |
| nagios_notifications | 1.20 |
| nagios_objects | 0.57 |
| nagios_processevents | 0.03 |
| nagios_programstatus | 0.00 |
| nagios_runtimevariables | 0.00 |
| nagios_scheduleddowntime | 0.00 |
| nagios_service_contactgroups | 0.08 |
| nagios_service_contacts | 0.00 |
| nagios_service_parentservices | 0.00 |
| nagios_servicechecks | 0.00 |
| nagios_servicedependencies | 0.00 |
| nagios_serviceescalation_contactgroups | 0.00 |
| nagios_serviceescalation_contacts | 0.00 |
| nagios_serviceescalations | 0.00 |
| nagios_servicegroup_members | 0.06 |
| nagios_servicegroups | 0.00 |
| nagios_services | 0.35 |
| nagios_servicestatus | 0.86 |
| nagios_statehistory | 35.17 |
| nagios_systemcommands | 0.04 |
| nagios_timedeventqueue | 0.00 |
| nagios_timedevents | 0.00 |
| nagios_timeperiod_timeranges | 0.02 |
| nagios_timeperiods | 0.01 |
| tbl_command | 0.08 |
| tbl_contact | 0.03 |
| tbl_contactgroup | 0.03 |
| tbl_contacttemplate | 0.03 |
| tbl_domain | 0.03 |
| tbl_host | 0.06 |
| tbl_hostdependency | 0.03 |
| tbl_hostescalation | 0.03 |
| tbl_hostextinfo | 0.03 |
| tbl_hostgroup | 0.03 |
| tbl_hosttemplate | 0.03 |
| tbl_info | 0.17 |
| tbl_lnkContactToCommandHost | 0.02 |
| tbl_lnkContactToCommandService | 0.02 |
| tbl_lnkContactToContactgroup | 0.02 |
| tbl_lnkContactToContacttemplate | 0.02 |
| tbl_lnkContactToVariabledefinition | 0.02 |
| tbl_lnkContactgroupToContact | 0.02 |
| tbl_lnkContactgroupToContactgroup | 0.02 |
| tbl_lnkContacttemplateToCommandHost | 0.02 |
| tbl_lnkContacttemplateToCommandService | 0.02 |
| tbl_lnkContacttemplateToContactgroup | 0.02 |
| tbl_lnkContacttemplateToContacttemplate | 0.02 |
| tbl_lnkContacttemplateToVariabledefinition | 0.02 |
| tbl_lnkHostToContact | 0.02 |
| tbl_lnkHostToContactgroup | 0.02 |
| tbl_lnkHostToHost | 0.02 |
| tbl_lnkHostToHostgroup | 0.02 |
| tbl_lnkHostToHosttemplate | 0.02 |
| tbl_lnkHostToVariabledefinition | 0.02 |
| tbl_lnkHostdependencyToHost_DH | 0.02 |
| tbl_lnkHostdependencyToHost_H | 0.02 |
| tbl_lnkHostdependencyToHostgroup_DH | 0.02 |
| tbl_lnkHostdependencyToHostgroup_H | 0.02 |
| tbl_lnkHostescalationToContact | 0.02 |
| tbl_lnkHostescalationToContactgroup | 0.02 |
| tbl_lnkHostescalationToHost | 0.02 |
| tbl_lnkHostescalationToHostgroup | 0.02 |
| tbl_lnkHostgroupToHost | 0.02 |
| tbl_lnkHostgroupToHostgroup | 0.02 |
| tbl_lnkHosttemplateToContact | 0.02 |
| tbl_lnkHosttemplateToContactgroup | 0.02 |
| tbl_lnkHosttemplateToHost | 0.02 |
| tbl_lnkHosttemplateToHostgroup | 0.02 |
| tbl_lnkHosttemplateToHosttemplate | 0.02 |
| tbl_lnkHosttemplateToVariabledefinition | 0.02 |
| tbl_lnkServiceToContact | 0.02 |
| tbl_lnkServiceToContactgroup | 0.02 |
| tbl_lnkServiceToHost | 0.02 |
| tbl_lnkServiceToHostgroup | 0.02 |
| tbl_lnkServiceToServicegroup | 0.02 |
| tbl_lnkServiceToServicetemplate | 0.02 |
| tbl_lnkServiceToVariabledefinition | 0.02 |
| tbl_lnkServicedependencyToHost_DH | 0.02 |
| tbl_lnkServicedependencyToHost_H | 0.02 |
| tbl_lnkServicedependencyToHostgroup_DH | 0.02 |
| tbl_lnkServicedependencyToHostgroup_H | 0.02 |
| tbl_lnkServicedependencyToService_DS | 0.02 |
| tbl_lnkServicedependencyToService_S | 0.02 |
| tbl_lnkServicedependencyToServicegroup_DS | 0.02 |
| tbl_lnkServicedependencyToServicegroup_S | 0.02 |
| tbl_lnkServiceescalationToContact | 0.02 |
| tbl_lnkServiceescalationToContactgroup | 0.02 |
| tbl_lnkServiceescalationToHost | 0.02 |
| tbl_lnkServiceescalationToHostgroup | 0.02 |
| tbl_lnkServiceescalationToService | 0.02 |
| tbl_lnkServiceescalationToServicegroup | 0.02 |
| tbl_lnkServicegroupToService | 0.02 |
| tbl_lnkServicegroupToServicegroup | 0.02 |
| tbl_lnkServicetemplateToContact | 0.02 |
| tbl_lnkServicetemplateToContactgroup | 0.02 |
| tbl_lnkServicetemplateToHost | 0.02 |
| tbl_lnkServicetemplateToHostgroup | 0.02 |
| tbl_lnkServicetemplateToServicegroup | 0.02 |
| tbl_lnkServicetemplateToServicetemplate | 0.02 |
| tbl_lnkServicetemplateToVariabledefinition | 0.02 |
| tbl_lnkTimeperiodToTimeperiod | 0.02 |
| tbl_logbook | 0.02 |
| tbl_mainmenu | 0.02 |
| tbl_permission | 0.02 |
| tbl_permission_inactive | 0.02 |
| tbl_service | 0.02 |
| tbl_servicedependency | 0.03 |
| tbl_serviceescalation | 0.03 |
| tbl_serviceextinfo | 0.03 |
| tbl_servicegroup | 0.03 |
| tbl_servicetemplate | 0.03 |
| tbl_session | 0.02 |
| tbl_session_locks | 0.02 |
| tbl_settings | 0.03 |
| tbl_submenu | 0.02 |
| tbl_timedefinition | 0.05 |
| tbl_timeperiod | 0.03 |
| tbl_user | 0.03 |
| tbl_variabledefinition | 0.02 |
| xi_auditlog | 0.13 |
| xi_auth_tokens | 0.03 |
| xi_cmp_ccm_backups | 0.02 |
| xi_cmp_favorites | 0.03 |
| xi_cmp_nagiosbpi_backups | 0.02 |
| xi_cmp_trapdata | 0.03 |
| xi_cmp_trapdata_log | 0.03 |
| xi_commands | 0.02 |
| xi_deploy_agents | 0.02 |
| xi_deploy_jobs | 0.02 |
| xi_eventqueue | 0.03 |
| xi_events | 0.05 |
| xi_incidents | 0.02 |
| xi_meta | 0.23 |
| xi_mibs | 0.05 |
| xi_options | 0.03 |
| xi_sessions | 0.03 |
| xi_sysstat | 0.03 |
| xi_usermeta | 0.16 |
| xi_users | 0.03 |
+--------------------------------------------+------------+
[root@cbq2-svu-nagxi1 components]#
kvijay
Posts: 8
Joined: Tue Oct 27, 2015 3:32 am

Re: SQL Error [nagiosxi]

Post by kvijay »

ssax wrote:What version of XI are you running?

Please send me a copy of your profile, you can download it from Admin > System Profile > Download Profile button.

If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:

Code: Select all

rm -rf /usr/local/nagiosxi/var/components/profile*​​
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
Then send me the resulting /usr/local/nagiosxi/var/components/profile.zip​ file.​

If the profile script fails, please include the ENTIRE output.

Additionally, please send the output of these commands (as root):
- NOTE: You may need to adjust the -h 127.0.0.1, the -uroot, and -pnagiosxi in the first command if your DB is offloaded to another server and/or you've changed the root mysql password

Code: Select all

echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table
This next command may fail, that's okay, not all systems have postgresql:

Code: Select all

echo "SELECT relname as Table, pg_size_pretty(pg_total_relation_size(relid)) As Size, pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as ExternalSize FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;" | psql nagiosxi nagiosxi


=====================================================
[root@cbq2-svu-nagxi1 components]# echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table
+--------------------------------------------+------------+
| Table | Size in MB |
+--------------------------------------------+------------+
| nagios_acknowledgements | 0.00 |
| nagios_commands | 0.02 |
| nagios_commenthistory | 7.25 |
| nagios_comments | 0.00 |
| nagios_configfiles | 0.00 |
| nagios_configfilevariables | 0.01 |
| nagios_conninfo | 0.06 |
| nagios_contact_addresses | 0.00 |
| nagios_contact_notificationcommands | 0.04 |
| nagios_contactgroup_members | 0.01 |
| nagios_contactgroups | 0.00 |
| nagios_contactnotificationmethods | 1.44 |
| nagios_contactnotifications | 1.53 |
| nagios_contacts | 0.01 |
| nagios_contactstatus | 0.01 |
| nagios_customvariables | 0.01 |
| nagios_customvariablestatus | 0.01 |
| nagios_dbversion | 0.00 |
| nagios_downtimehistory | 0.35 |
| nagios_eventhandlers | 0.00 |
| nagios_externalcommands | 0.00 |
| nagios_flappinghistory | 2.51 |
| nagios_host_contactgroups | 0.01 |
| nagios_host_contacts | 0.00 |
| nagios_host_parenthosts | 0.00 |
| nagios_hostchecks | 0.00 |
| nagios_hostdependencies | 0.00 |
| nagios_hostescalation_contactgroups | 0.00 |
| nagios_hostescalation_contacts | 0.00 |
| nagios_hostescalations | 0.00 |
| nagios_hostgroup_members | 0.01 |
| nagios_hostgroups | 0.00 |
| nagios_hosts | 0.02 |
| nagios_hoststatus | 0.05 |
| nagios_instances | 0.00 |
| nagios_logentries | 2086.79 |
| nagios_notifications | 1.20 |
| nagios_objects | 0.57 |
| nagios_processevents | 0.03 |
| nagios_programstatus | 0.00 |
| nagios_runtimevariables | 0.00 |
| nagios_scheduleddowntime | 0.00 |
| nagios_service_contactgroups | 0.08 |
| nagios_service_contacts | 0.00 |
| nagios_service_parentservices | 0.00 |
| nagios_servicechecks | 0.00 |
| nagios_servicedependencies | 0.00 |
| nagios_serviceescalation_contactgroups | 0.00 |
| nagios_serviceescalation_contacts | 0.00 |
| nagios_serviceescalations | 0.00 |
| nagios_servicegroup_members | 0.06 |
| nagios_servicegroups | 0.00 |
| nagios_services | 0.35 |
| nagios_servicestatus | 0.86 |
| nagios_statehistory | 35.17 |
| nagios_systemcommands | 0.04 |
| nagios_timedeventqueue | 0.00 |
| nagios_timedevents | 0.00 |
| nagios_timeperiod_timeranges | 0.02 |
| nagios_timeperiods | 0.01 |
| tbl_command | 0.08 |
| tbl_contact | 0.03 |
| tbl_contactgroup | 0.03 |
| tbl_contacttemplate | 0.03 |
| tbl_domain | 0.03 |
| tbl_host | 0.06 |
| tbl_hostdependency | 0.03 |
| tbl_hostescalation | 0.03 |
| tbl_hostextinfo | 0.03 |
| tbl_hostgroup | 0.03 |
| tbl_hosttemplate | 0.03 |
| tbl_info | 0.17 |
| tbl_lnkContactToCommandHost | 0.02 |
| tbl_lnkContactToCommandService | 0.02 |
| tbl_lnkContactToContactgroup | 0.02 |
| tbl_lnkContactToContacttemplate | 0.02 |
| tbl_lnkContactToVariabledefinition | 0.02 |
| tbl_lnkContactgroupToContact | 0.02 |
| tbl_lnkContactgroupToContactgroup | 0.02 |
| tbl_lnkContacttemplateToCommandHost | 0.02 |
| tbl_lnkContacttemplateToCommandService | 0.02 |
| tbl_lnkContacttemplateToContactgroup | 0.02 |
| tbl_lnkContacttemplateToContacttemplate | 0.02 |
| tbl_lnkContacttemplateToVariabledefinition | 0.02 |
| tbl_lnkHostToContact | 0.02 |
| tbl_lnkHostToContactgroup | 0.02 |
| tbl_lnkHostToHost | 0.02 |
| tbl_lnkHostToHostgroup | 0.02 |
| tbl_lnkHostToHosttemplate | 0.02 |
| tbl_lnkHostToVariabledefinition | 0.02 |
| tbl_lnkHostdependencyToHost_DH | 0.02 |
| tbl_lnkHostdependencyToHost_H | 0.02 |
| tbl_lnkHostdependencyToHostgroup_DH | 0.02 |
| tbl_lnkHostdependencyToHostgroup_H | 0.02 |
| tbl_lnkHostescalationToContact | 0.02 |
| tbl_lnkHostescalationToContactgroup | 0.02 |
| tbl_lnkHostescalationToHost | 0.02 |
| tbl_lnkHostescalationToHostgroup | 0.02 |
| tbl_lnkHostgroupToHost | 0.02 |
| tbl_lnkHostgroupToHostgroup | 0.02 |
| tbl_lnkHosttemplateToContact | 0.02 |
| tbl_lnkHosttemplateToContactgroup | 0.02 |
| tbl_lnkHosttemplateToHost | 0.02 |
| tbl_lnkHosttemplateToHostgroup | 0.02 |
| tbl_lnkHosttemplateToHosttemplate | 0.02 |
| tbl_lnkHosttemplateToVariabledefinition | 0.02 |
| tbl_lnkServiceToContact | 0.02 |
| tbl_lnkServiceToContactgroup | 0.02 |
| tbl_lnkServiceToHost | 0.02 |
| tbl_lnkServiceToHostgroup | 0.02 |
| tbl_lnkServiceToServicegroup | 0.02 |
| tbl_lnkServiceToServicetemplate | 0.02 |
| tbl_lnkServiceToVariabledefinition | 0.02 |
| tbl_lnkServicedependencyToHost_DH | 0.02 |
| tbl_lnkServicedependencyToHost_H | 0.02 |
| tbl_lnkServicedependencyToHostgroup_DH | 0.02 |
| tbl_lnkServicedependencyToHostgroup_H | 0.02 |
| tbl_lnkServicedependencyToService_DS | 0.02 |
| tbl_lnkServicedependencyToService_S | 0.02 |
| tbl_lnkServicedependencyToServicegroup_DS | 0.02 |
| tbl_lnkServicedependencyToServicegroup_S | 0.02 |
| tbl_lnkServiceescalationToContact | 0.02 |
| tbl_lnkServiceescalationToContactgroup | 0.02 |
| tbl_lnkServiceescalationToHost | 0.02 |
| tbl_lnkServiceescalationToHostgroup | 0.02 |
| tbl_lnkServiceescalationToService | 0.02 |
| tbl_lnkServiceescalationToServicegroup | 0.02 |
| tbl_lnkServicegroupToService | 0.02 |
| tbl_lnkServicegroupToServicegroup | 0.02 |
| tbl_lnkServicetemplateToContact | 0.02 |
| tbl_lnkServicetemplateToContactgroup | 0.02 |
| tbl_lnkServicetemplateToHost | 0.02 |
| tbl_lnkServicetemplateToHostgroup | 0.02 |
| tbl_lnkServicetemplateToServicegroup | 0.02 |
| tbl_lnkServicetemplateToServicetemplate | 0.02 |
| tbl_lnkServicetemplateToVariabledefinition | 0.02 |
| tbl_lnkTimeperiodToTimeperiod | 0.02 |
| tbl_logbook | 0.02 |
| tbl_mainmenu | 0.02 |
| tbl_permission | 0.02 |
| tbl_permission_inactive | 0.02 |
| tbl_service | 0.02 |
| tbl_servicedependency | 0.03 |
| tbl_serviceescalation | 0.03 |
| tbl_serviceextinfo | 0.03 |
| tbl_servicegroup | 0.03 |
| tbl_servicetemplate | 0.03 |
| tbl_session | 0.02 |
| tbl_session_locks | 0.02 |
| tbl_settings | 0.03 |
| tbl_submenu | 0.02 |
| tbl_timedefinition | 0.05 |
| tbl_timeperiod | 0.03 |
| tbl_user | 0.03 |
| tbl_variabledefinition | 0.02 |
| xi_auditlog | 0.13 |
| xi_auth_tokens | 0.03 |
| xi_cmp_ccm_backups | 0.02 |
| xi_cmp_favorites | 0.03 |
| xi_cmp_nagiosbpi_backups | 0.02 |
| xi_cmp_trapdata | 0.03 |
| xi_cmp_trapdata_log | 0.03 |
| xi_commands | 0.02 |
| xi_deploy_agents | 0.02 |
| xi_deploy_jobs | 0.02 |
| xi_eventqueue | 0.03 |
| xi_events | 0.05 |
| xi_incidents | 0.02 |
| xi_meta | 0.23 |
| xi_mibs | 0.05 |
| xi_options | 0.03 |
| xi_sessions | 0.03 |
| xi_sysstat | 0.03 |
| xi_usermeta | 0.16 |
| xi_users | 0.03 |
+--------------------------------------------+------------+
[root@cbq2-svu-nagxi1 components]#
kvijay
Posts: 8
Joined: Tue Oct 27, 2015 3:32 am

Re: SQL Error [nagiosxi]

Post by kvijay »

Below is the output of command.attached the profile.zip



[root@cbq2-svu-nagxi1 components]# /usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
-------------------Fetching Information-------------------
Please wait.......
Creating system information...
Creating nagios.txt...
Creating perfdata.txt...
Creating npcd.txt...
Creating cmdsubsys.txt...
Creating event_handler.txt...
Creating eventman.txt...
Creating perfdataproc.txt...
Creating sysstat.txt...
Creating systemlog.txt...
Retrieving all snmp logs...
Creating apacheerrors.txt...
Creating mysqllog.txt...
Getting xi_users...
Getting xi_usermeta...
Getting xi_options(mail)...
Getting xi_otions(smtp)...
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
Creating a sanatized copy of config.inc.php...
Creating memorybyprocess.txt...
Creating filesystem.txt...
Dumping PS - AEF to psaef.txt...
Creating top log...
Creating sar log...
Copying objects.cache...
Copying MRTG Configs...
tar: Removing leading `/' from member names
Counting Performance Data Files...
Counting MRTG Files...
Getting Network Information...
Getting CPU info...
Getting memory info...
Getting ipcs Information...
Getting SSH terminal / shellinabox yum info...
Error: No matching Packages to list
Getting Nagios Core version...
Getting NDO2DB version...
Getting NPCD version...
Getting NRPE version...
Getting NSCA version...
Getting NagVis version...
Getting WKTMLTOPDF version...
Getting Nagios-Plugins version...
Getting BPI configs...
Getting Firewall information...
Getting maillog...
Getting phpmailer.log...
tail: cannot open ‘/usr/local/nagiosxi/tmp/phpmailer.log’ for reading: No such file or directory
Getting nom data...
Zipping logs directory...
adding: profile-1597234518/ (stored 0%)
adding: profile-1597234518/nagios-logs/ (stored 0%)
adding: profile-1597234518/nagios-logs/nagios.txt (deflated 87%)
adding: profile-1597234518/nagios-logs/perfdata.txt (deflated 91%)
adding: profile-1597234518/nagios-logs/npcd.txt (deflated 93%)
adding: profile-1597234518/nagios-logs/cmdsubsys.txt (deflated 98%)
adding: profile-1597234518/nagios-logs/event_handler.txt (deflated 92%)
adding: profile-1597234518/nagios-logs/eventman.txt (deflated 92%)
adding: profile-1597234518/nagios-logs/perfdataproc.txt (deflated 95%)
adding: profile-1597234518/nagios-logs/sysstat.txt (deflated 89%)
adding: profile-1597234518/logs/ (stored 0%)
adding: profile-1597234518/logs/messages.txt (deflated 90%)
adding: profile-1597234518/logs/snmptt.txt (stored 0%)
adding: profile-1597234518/logs/snmpttsystem.txt (deflated 74%)
adding: profile-1597234518/logs/access_log.txt (deflated 95%)
adding: profile-1597234518/logs/access_log-20200719.gz.txt (deflated 21%)
adding: profile-1597234518/logs/access_log-20200726.gz.txt (deflated 11%)
adding: profile-1597234518/logs/access_log-20200802.gz.txt (stored 0%)
adding: profile-1597234518/logs/access_log-20200809.txt (deflated 95%)
adding: profile-1597234518/logs/error_log.txt (deflated 71%)
adding: profile-1597234518/logs/error_log-20200719.gz.txt (stored 0%)
adding: profile-1597234518/logs/error_log-20200726.gz.txt (stored 0%)
adding: profile-1597234518/logs/error_log-20200802.gz.txt (stored 0%)
adding: profile-1597234518/logs/error_log-20200809.txt (deflated 76%)
adding: profile-1597234518/logs/ssl_access_log.txt (deflated 97%)
adding: profile-1597234518/logs/ssl_access_log-20200720.gz.txt (stored 0%)
adding: profile-1597234518/logs/ssl_access_log-20200726.gz.txt (deflated 60%)
adding: profile-1597234518/logs/ssl_access_log-20200802.gz.txt (stored 0%)
adding: profile-1597234518/logs/ssl_access_log-20200809.txt (deflated 98%)
adding: profile-1597234518/logs/ssl_error_log.txt (deflated 96%)
adding: profile-1597234518/logs/ssl_error_log-20200722.gz.txt (deflated 1%)
adding: profile-1597234518/logs/ssl_error_log-20200726.gz.txt (deflated 5%)
adding: profile-1597234518/logs/ssl_error_log-20200806.gz.txt (stored 0%)
adding: profile-1597234518/logs/ssl_error_log-20200809.txt (deflated 96%)
adding: profile-1597234518/logs/ssl_request_log.txt (deflated 97%)
adding: profile-1597234518/logs/ssl_request_log-20200720.gz.txt (stored 0%)
adding: profile-1597234518/logs/ssl_request_log-20200726.gz.txt (deflated 68%)
adding: profile-1597234518/logs/ssl_request_log-20200802.gz.txt (stored 0%)
adding: profile-1597234518/logs/ssl_request_log-20200809.txt (deflated 98%)
adding: profile-1597234518/logs/database_host.txt (deflated 3%)
adding: profile-1597234518/logs/database_log.txt (deflated 91%)
adding: profile-1597234518/versions/ (stored 0%)
adding: profile-1597234518/versions/shellinabox.txt (deflated 6%)
adding: profile-1597234518/versions/nagios.txt (deflated 40%)
adding: profile-1597234518/versions/ndo2db.txt (deflated 32%)
adding: profile-1597234518/versions/npcd.txt (deflated 39%)
adding: profile-1597234518/versions/nrpe.txt (stored 0%)
adding: profile-1597234518/versions/nsca.txt (deflated 22%)
adding: profile-1597234518/versions/nagvis.txt (stored 0%)
adding: profile-1597234518/versions/wkhtmltopdf.txt (stored 0%)
adding: profile-1597234518/versions/nagios-plugins.txt (deflated 2%)
adding: profile-1597234518/hostinfo.txt (stored 0%)
adding: profile-1597234518/xi_users.txt (deflated 62%)
adding: profile-1597234518/xi_usermeta.txt (deflated 97%)
adding: profile-1597234518/xi_options_mail.txt (deflated 94%)
adding: profile-1597234518/xi_options_smtp.txt (deflated 97%)
adding: profile-1597234518/config.inc.php (deflated 68%)
adding: profile-1597234518/memorybyprocess.txt (deflated 82%)
adding: profile-1597234518/filesystem.txt (deflated 75%)
adding: profile-1597234518/psaef.txt (deflated 83%)
adding: profile-1597234518/top.txt (deflated 81%)
adding: profile-1597234518/sar.txt (deflated 59%)
adding: profile-1597234518/1597213931.tar.gz (deflated 1%)
adding: profile-1597234518/objects.cache (deflated 98%)
adding: profile-1597234518/mrtg.tar.gz (stored 0%)
adding: profile-1597234518/file_counts.txt (deflated 47%)
adding: profile-1597234518/ip_addr.txt (deflated 55%)
adding: profile-1597234518/cpuinfo.txt (deflated 68%)
adding: profile-1597234518/meminfo.txt (deflated 49%)
adding: profile-1597234518/ipcs.txt (deflated 73%)
adding: profile-1597234518/bpi/ (stored 0%)
adding: profile-1597234518/bpi/bpi.conf (deflated 91%)
adding: profile-1597234518/bpi/bpi.conf.backup (deflated 61%)
adding: profile-1597234518/iptables.txt (deflated 75%)
adding: profile-1597234518/firewalld.txt (deflated 21%)
adding: profile-1597234518/maillog (deflated 89%)
adding: profile-1597234518/phpmailer.log (stored 0%)
adding: profile-1597234518/nom/ (stored 0%)
adding: profile-1597234518/nom/checkpoints/ (stored 0%)
adding: profile-1597234518/nom/checkpoints/nagioscore/ (stored 0%)
adding: profile-1597234518/nom/checkpoints/nagioscore/errors/ (stored 0%)
adding: profile-1597234518/nom/checkpoints/nagioscore/errors/1571319647.txt (deflated 60%)
adding: profile-1597234518/nom/checkpoints/nagioscore/errors/1571319647.tar.gz (deflated 1%)
adding: profile-1597234518/nom/checkpoints/nagiosxi/ (stored 0%)
adding: profile-1597234518/nom/checkpoints/nagiosxi/1597213931_nagiosql.sql.gz (deflated 0%)
Backup and Zip complete!
[root@cbq2-svu-nagxi1 components]#
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SQL Error [nagiosxi]

Post by ssax »

Please answer this:

What version of XI are you running?

What OS/version are you running?

Code: Select all

cat /etc/*release
uname -a
I'm also seeing this in the profile:

ERROR: License is not activated.

What does Admin > License Information show?

I also see your NDO2DB process is running with -f:
-f = Do not fork daemon.

Code: Select all

/usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg -f
The defaults should just use:

Code: Select all

/usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
Please attach your /etc/init.d/ndo2db file.

Additionally, do you have Admin > Performance Settings > Backend Cache enabled?
kvijay
Posts: 8
Joined: Tue Oct 27, 2015 3:32 am

Re: SQL Error [nagiosxi]

Post by kvijay »

[root@cbq2-svu-nagxi1 ~]# systemctl cat ndo2db.service
# /usr/lib/systemd/system/ndo2db.service
[Unit]
Description=Nagios Data Out Daemon
Documentation=http://www.nagios.org/documentation
After=var-run.mount nss-lookup.target network.target local-fs.target time-sync.target mariadb.service mysql.service
Before=[email protected] plymouth-quit.service xdm.service nagios.service
Conflicts=ndo2db.socket

[Install]
WantedBy=multi-user.target

[Service]
Type=simple
Restart=on-abort
PIDFile=/usr/local/nagios/var/ndo2db.lock
RuntimeDirectory=ndo2db
RuntimeDirectoryMode=0755
ExecStartPre=/bin/rm -f /usr/local/nagios/var/ndo2db.lock
ExecStartPre=/bin/rm -f /usr/local/nagios/var/ndo.sock
ExecStart=/usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg -f
ExecStopPost=/bin/rm -f /usr/local/nagios/var/ndo2db.lock
TimeoutStopSec=60
User=nagios
Group=nagios
PrivateTmp=true
OOMScoreAdjust=-500
[root@cbq2-svu-nagxi1 ~]# cat





[root@cbq2-svu-nagxi1 ~]# uname -a
Linux cbq2-svu-nagxi1.cbq.com.qa 3.10.0-1127.18.2.el7.x86_64 #1 SMP Wed Jul 29 17:20:57 PDT 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@cbq2-svu-nagxi1 ~]# cat /etc/oracle-release
Oracle Linux Server release 7.8
[root@cbq2-svu-nagxi1 ~]#
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SQL Error [nagiosxi]

Post by ssax »

That looks proper.

Ignore the -f, that's normal.

Please create a ticket for this and include a link back to this forum thread so we can get a remote session setup:

https://support.nagios.com/tickets/
Locked