Renaming tool screwed up

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Renaming tool screwed up

Post by ssax »

What is the output of this command:

Code: Select all

ls -l /usr/local/nagiosxi/scripts

Here is the code where I believe it's failing:

Code: Select all

//bail if we didn't find nagiosql contents
if(!$check) exit(5);

//added error check -MG 
if($return_code > 0) exit(5); 
So it could either be no nagiosql data in the file or it's getting an error code from the command.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Renaming tool screwed up

Post by WillemDH »

Code: Select all

 ls -l /usr/local/nagiosxi/scripts
total 1044
-rwxr-x---. 1 nagios nagios   4653 Jan 28  2014 backup_xi_old.sh
-rwxr-x---  1 nagios nagios   5285 Oct 20 11:14 backup_xi.sh
-rwxr-x---  1 nagios nagios   1664 Oct 20 11:14 change_timezone.sh
-rw-r-----  1 nagios nagios   2526 Oct 20 11:14 contact_notification_handler.php
-rwxr-x---. 1 nagios nagios    656 Oct 20 11:14 export_nagiosql.sh
-rwxr-x---. 1 nagios nagios    824 Oct 20 11:14 handle_nagioscore_event.php
-rwxr-x---. 1 nagios nagios    832 Oct 20 11:14 handle_nagioscore_notification.php
-rwxr-x---. 1 nagios nagios    432 Oct 20 11:14 import_nagiosql.sh
-rw-r-----  1 nagios nagios    908 Oct 20 11:14 import_xiconfig.php
-rwxr-x---. 1 nagios nagios    153 Oct 20 11:14 kill_rrdtool.sh
-rwxr-x---  1 nagios nagios   2348 Oct 20 11:14 manage_services.sh
-rwxrwxr-x  1 nagios nagios    161 Nov  9 15:54 nagiosql.cookies
-rwxrwxr-x. 1 nagios nagios 271780 Oct 20 11:14 nagiosql_defaults.sql
-rwxrwxr-x  1 nagios nagios  40585 Oct 20 12:27 nagiosql.delete.contact
-rwxrwxr-x. 1 nagios nagios    952 Oct 20 11:14 nagiosql_delete_contact.php
-rwxrwxr-x  1 nagios nagios  31864 Aug 20  2013 nagiosql.delete.host
-rwxrwxr-x. 1 nagios nagios   1991 Oct 20 11:14 nagiosql_delete_host.php
-rwxrwxr-x. 1 nagios nagios    509 Oct 20 11:14 nagiosql_delete_object.sh
-rwxrwxr-x  1 nagios nagios 165936 Jul 14 12:46 nagiosql.delete.service
-rwxrwxr-x. 1 nagios nagios   2846 Oct 20 11:14 nagiosql_delete_service.php
-rwxrwxr-x  1 nagios nagios  42504 Oct 20 12:27 nagiosql.delete.timeperiod
-rwxrwxr-x. 1 nagios nagios    956 Oct 20 11:14 nagiosql_delete_timeperiod.php
-rwxrwxr-x  1 nagios nagios   7400 Jun 12  2014 nagiosql.export.additional
-rwxrwxr-x. 1 nagios nagios   1334 Oct 20 11:14 nagiosql_exportall.php
-rwxrwxr-x  1 nagios nagios  16040 Nov  9 15:54 nagiosql.export.monitoring
-rwxrwxr-x. 1 nagios nagios   1348 Oct 20 11:14 nagiosql_importall.php
-rwxrwxr-x  1 nagios nagios 241310 Nov  9 10:30 nagiosql.import.monitoring
-rwxrwxr-x  1 nagios nagios  38990 Nov  9 15:54 nagiosql.login
-rwxrwxr-x. 1 nagios nagios   1849 Oct 20 11:14 nagiosql_login.php
-rwxrwxr-x  1 nagios nagios   2246 Oct 20 11:14 nagiosql_snapshot.sh
-rwxrwxr-x. 1 nagios nagios    262 Oct 20 11:14 nagiosql_trim_backups.sh
-rwxr-x---. 1 nagios nagios    519 Oct 20 11:14 nom_create_nagioscore_checkpoint_cond.sh
-rwxr-x---. 1 nagios nagios   1049 Oct 20 11:14 nom_create_nagioscore_checkpoint.sh
-rwxr-x---. 1 nagios nagios    854 Oct 20 11:14 nom_create_nagioscore_errorpoint.sh
-rwxr-x---. 1 nagios nagios    792 Oct 20 11:14 nom_restore_nagioscore_checkpoint.sh
-rwxr-x---. 1 nagios nagios    843 Oct 20 11:14 nom_restore_nagioscore_checkpoint_specific.sh
-rwxr-x---. 1 nagios nagios   2972 Oct 20 11:14 nom_trim_nagioscore_checkpoints.sh
-rwxr-x---. 1 nagios nagios   4621 Oct 20 11:14 parse_core_eventlog.php
-rwxr-x---. 1 nagios nagios   6077 Oct 20 11:14 patch_ndoutils.php
-rwxr-x---. 1 nagios nagios    599 Oct 20 11:14 reconfigure_nagios.sh
-rwxr-x---  1 nagios nagios    539 Oct 20 11:14 repair_databases.sh
-rwxr-x---. 1 nagios nagios   1238 Oct 20 11:14 repairmysql.sh
-rwxr-x---. 1 nagios nagios   6798 Jun  4 10:17 reset_config_perms
-rw-r-----. 1 nagios nagios    280 Jun  4 10:17 reset_config_perms.c
-rwsr-xr-x. 1 root   nagios   1068 Oct 20 11:14 reset_config_perms.sh
-rwxr-x---. 1 nagios nagios   1155 Oct 20 11:14 reset_nagiosadmin_password.php
-rwxr-x---. 1 nagios nagios   1635 Oct 20 11:14 restart_nagios_with_export.sh
-rwxr-x---. 1 nagios nagios    765 Oct 20 11:14 restore_defaults.sh
-rwxr-x---. 1 nagios nagios   8111 Oct 20 11:14 restore_xi.sh
-rw-r-----  1 nagios nagios   1847 Oct 20 11:14 send_to_auditlog.php
-rw-r-----. 1 nagios nagios   2700 Oct 20 11:14 uninstall_xi.sh
-rwxr-x---  1 nagios nagios   2576 Oct 20 11:14 upgrade_to_latest.sh
Nagios XI 5.8.1
https://outsideit.net
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Renaming tool screwed up

Post by ssax »

Code: Select all

chmod 750 /usr/local/nagiosxi/scripts/import_xiconfig.php
chmod 750 /usr/local/nagiosxi/scripts/send_to_auditlog.php
Run those commands and try it again.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Renaming tool screwed up

Post by WillemDH »

Sean,

Same problem...

An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.

NAGIOSQL WRITE CONFIGS FAILED!\n
OUTPUT=NAGIOSQL WRITE CONFIGS FAILED!\n
RETURNCODE=5

Had to remove the lock file again.The host did get renamed.
Nagios XI 5.8.1
https://outsideit.net
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Renaming tool screwed up

Post by ssax »

I'm wondering if you're hitting a PHP timeout or exceeding a setting in PHP. Are you seeing anything in your /var/log/httpd/error_log or /var/log/httpd/ssl_error_log?
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Renaming tool screwed up

Post by WillemDH »

Except for the usal php notices I don't immediately see anything:

Code: Select all

[Wed Nov 11 08:16:55 2015] [error] [client 10.54.24.121] PHP Notice:  Undefined index: disable_external_commands in /usr/local/nrdp/server/plugins/nagioscorecmd/nagioscorecmd.inc.php on line 40
[Wed Nov 11 08:16:55 2015] [error] [client 10.54.24.121] PHP Notice:  Undefined index: disable_external_commands in /usr/local/nrdp/server/plugins/nagioscorecmd/nagioscorecmd.inc.php on line 40
[Wed Nov 11 09:15:06 2015] [error] [client 10.54.24.121] PHP Notice:  Undefined index: disable_external_commands in /usr/local/nrdp/server/plugins/nagioscorecmd/nagioscorecmd.inc.php on line 40
[Wed Nov 11 10:15:07 2015] [error] [client 10.54.24.121] PHP Notice:  Undefined index: disable_external_commands in /usr/local/nrdp/server/plugins/nagioscorecmd/nagioscorecmd.inc.php on line 40
[Wed Nov 11 11:15:07 2015] [error] [client 10.54.24.121] PHP Notice:  Undefined index: disable_external_commands in /usr/local/nrdp/server/plugins/nagioscorecmd/nagioscorecmd.inc.php on line 40
Nothing special in the ssl error log.
Nagios XI 5.8.1
https://outsideit.net
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Renaming tool screwed up

Post by ssax »

Hmm, do you have errors enabled? Edit this file:

Code: Select all

/usr/local/nagiosxi/html/includes/db.inc.php
At the top, change this:

Code: Select all

error_reporting($error_level);
To:

Code: Select all

//error_reporting($error_level); 
I'm not sure if restarting httpd is required, wouldn't hurt though.

Then you may see more in your /var/log/httpd/ssl_error_log or /var/log/httpd/error_log files.

Then do the renaming tool again but check the box so that it doesn't apply configuration at the end.

Then run these commands as root and see if it errors out:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Renaming tool screwed up

Post by WillemDH »

Done as you ask. These are the errors I'm getting:

Code: Select all

[Wed Nov 11 21:43:40 2015] [error] [client 172.21.5.41] PHP Notice:  Undefined variable: tour in /usr/local/nagiosxi/html/includes/components/helpsystem/helpsystem.inc.php on line 295, referer: http://srvnagios01/nagiosxi/index.php?
[Wed Nov 11 21:43:40 2015] [error] [client 172.21.5.41] PHP Notice:  Undefined variable: tour in /usr/local/nagiosxi/html/includes/components/helpsystem/helpsystem.inc.php on line 304, referer: http://srvnagios01/nagiosxi/index.php?
[Wed Nov 11 21:43:47 2015] [error] [client 172.21.5.41] PHP Notice:  Undefined variable: show_tour in /usr/local/nagiosxi/html/includes/components/helpsystem/tours.php on line 24, referer: http://srvnagios01/nagiosxi/includes/components/ccm/xi-index.php
[Wed Nov 11 21:43:49 2015] [error] [client 172.21.5.41] PHP Notice:  Undefined variable: show_tour in /usr/local/nagiosxi/html/includes/components/helpsystem/tours.php on line 24, referer: http://srvnagios01/nagiosxi/includes/components/rename/rename.php
[Wed Nov 11 21:43:53 2015] [error] [client 172.21.5.41] PHP Notice:  Undefined variable: show_tour in /usr/local/nagiosxi/html/includes/components/helpsystem/tours.php on line 24, referer: http://srvnagios01/nagiosxi/includes/components/rename/rename.php
[Wed Nov 11 21:43:53 2015] [error] [client 172.21.5.41] PHP Notice:  Undefined variable: show_tour in /usr/local/nagiosxi/html/includes/components/helpsystem/tours.php on line 24, referer: http://srvnagios01/nagiosxi/includes/components/rename/rename.php
[Wed Nov 11 21:43:56 2015] [error] [client 172.21.5.41] PHP Notice:  Undefined variable: show_tour in /usr/local/nagiosxi/html/includes/components/helpsystem/tours.php on line 24, referer: http://srvnagios01/nagiosxi/includes/components/rename/rename.php?stage=2&objecttype=host&search=lampas
[Wed Nov 11 21:44:02 2015] [error] [client 172.21.5.41] PHP Notice:  Undefined variable: show_tour in /usr/local/nagiosxi/html/includes/components/helpsystem/tours.php on line 24, referer: http://srvnagios01/nagiosxi/includes/components/rename/rename.php?stage=2&objecttype=host&search=lampas
[Wed Nov 11 21:44:11 2015] [error] [client 172.21.5.41] PHP Notice:  Undefined variable: show_tour in /usr/local/nagiosxi/html/includes/components/helpsystem/tours.php on line 24, referer: http://srvnagios01/nagiosxi/includes/components/rename/rename.php
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined variable: host_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 135
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined variable: service_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 143
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined variable: hostgroup_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 151
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined variable: servicegroup_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 159
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined variable: contact_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 168
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined variable: contactgroup_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 176
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined variable: hostdependency_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 192
[Wed Nov 11 21:44:56 2015] [error] [client ::1] PHP Notice:  Undefined variable: servicedependency_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 200
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: uid in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 388
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 179
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/utils-perms.inc.php on line 104
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 737
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined index: user_id in /usr/local/nagiosxi/html/includes/dbauth.inc.php on line 863
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined variable: host_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 135
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined variable: service_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 143
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined variable: hostgroup_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 151
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined variable: servicegroup_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 159
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined variable: contact_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 168
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined variable: contactgroup_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 176
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined variable: hostdependency_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 192
[Wed Nov 11 21:44:57 2015] [error] [client ::1] PHP Notice:  Undefined variable: servicedependency_count in /usr/local/nagiosxi/html/includes/components/ccm/ccm-splash.inc.php on line 200
[Wed Nov 11 21:44:58 2015] [error] [client ::1] PHP Notice:  Undefined index: language in /usr/local/nagiosxi/html/includes/components/ccm/includes/common_functions.inc.php on line 719
[Wed Nov 11 21:44:58 2015] [error] [client ::1] PHP Notice:  Undefined index: language in /usr/local/nagiosxi/html/includes/components/ccm/includes/common_functions.inc.php on line 720
In the SSL error log:

Code: Select all

 tail -f /var/log/httpd/ssl_error_log
[Sun Nov 08 03:06:11 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Nov 08 03:06:11 2015] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Mon Nov 09 10:56:30 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Mon Nov 09 10:56:30 2015] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Mon Nov 09 10:56:30 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Mon Nov 09 10:56:30 2015] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Wed Nov 11 21:41:19 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Nov 11 21:41:19 2015] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Wed Nov 11 21:41:20 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Nov 11 21:41:20 2015] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
Not sure where this is coming from. In CLI I get:

Code: Select all

2015-11-11 21:44:57 (509 KB/s) - “nagiosql.login” saved [38828]

LOGIN 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
--2015-11-11 21:44:57--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.export.monitoring”

    [                                                                                                                                                                                       <=>       ] 11,681      3.33K/s   in 3m 6s

2015-11-11 21:48:04 (62.7 B/s) - “nagiosql.export.monitoring” saved [11681]

NAGIOSQL WRITE CONFIGS FAILED!\n
Ah and checked one more time now it failed an the error log does indeed contain:

Code: Select all

[Wed Nov 11 21:48:04 2015] [error] [client ::1] PHP Fatal error:  Maximum execution time of 120 seconds exceeded in /usr/local/nagiosxi/html/includes/components/ccm/classes/config_class.php on line 998
So how do I change the max execution time? And why does it take so long to rename one host??
Nagios XI 5.8.1
https://outsideit.net
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Renaming tool screwed up

Post by Box293 »

Edit /etc/php.ini and change the value:

Code: Select all

max_execution_time = xx
Then:

Code: Select all

service httpd restart
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Renaming tool screwed up

Post by WillemDH »

Set it to 300 which solved my issue. Apparently a full apply after a rename operation takes 3+ minutes. It seems to me that the method used to rename a host is not very efficient? The error code is also not very self-explaining, as is the info in the gui (just a red block). As it complained about configs of other hosts being incorrect, it made me look into wrong reasons. If the gui would have said "PHP timeout reached.." it would take 2 minutes to solve the issue. Now I literally wasted hours..
Please consider making a feature request to:
- Create better error status'es in case of PHP timeouts.
- Make the renaming use more effecient techniques to rename a host, resulting in smaller apply configuration times

Thanks.
Nagios XI 5.8.1
https://outsideit.net
Locked