Page 1 of 1

Blank Error when Attempting to Apply Configuration

Posted: Thu Dec 18, 2014 6:02 pm
by AllrecipesDCO
Hello,

We just installed the latest version of Nagios XI on a server running 64-bit RHEL 7.0. It is a manual install of XI following the instructions found here: http://assets.nagios.com/downloads/nagi ... ctions.pdf

There's nothing special about our configuration, no Gnome installed, it was set up by just following the instructions above. We are registerd on the RedHat Network.
The installation succeeded, and I'm able to access the web page.

However, when I attempt to Apply Configuration (even if no changes were made), I get the blank error in the attached screenshot. It doesn't record any configuration snapshot for the error configuration, either.

All tests show the configuration as healthy, it just doesn't appear to be saved on the server side. I've also attached the Admin->System Profile page in the hopes that it will help.

Re: Blank Error when Attempting to Apply Configuration

Posted: Thu Dec 18, 2014 7:19 pm
by Box293
From looking at a couple of logs, I've got a feeling this is mysql related.

In your /var/log/httpd/error_log I see this as the last entry:

Code: Select all

/usr/bin/tail: cannot open '/var/log/mysqld.log' for reading: No such file or directory
Can you execute these commands and post the output:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh

Re: Blank Error when Attempting to Apply Configuration

Posted: Wed Jan 07, 2015 1:11 pm
by AllrecipesDCO
Box293 wrote:
Can you execute these commands and post the output:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh

I've run that script a few times, and it doesn't seem to help at all. Here's the output:

Code: Select all

[root@USBOSNAGI01 scripts]# ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://loca                                                                                                                                                             lhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'subm                                                                                                                                                             it=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O                                                                                                                                                              nagiosql.login--2015-01-07 10:09:35--  http://localhost/nagiosxi/includes/compon                                                                                                                                                             ents/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ânagiosql.loginâ

    [ <=>                                   ] 11,241      --.-K/s   in 0.007s

2015-01-07 10:09:35 (1.50 MB/s) - ânagiosql.loginâ saved [11241]

LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
SETUID ROOT OK
RESETTING PERMS
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://loca                                                                                                                                                             lhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'subm                                                                                                                                                             it=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O                                                                                                                                                              nagiosql.login--2015-01-07 10:09:35--  http://localhost/nagiosxi/includes/compon                                                                                                                                                             ents/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ânagiosql.loginâ

    [ <=>                                   ] 11,241      --.-K/s   in 0.007s

2015-01-07 10:09:35 (1.52 MB/s) - ânagiosql.loginâ saved [11241]

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-01-07 10:09:36--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ânagiosql.export.monitoringâ

    [  <=>                                  ] 14,095      42.4KB/s   in 0.3s

2015-01-07 10:09:36 (42.4 KB/s) - ânagiosql.export.monitoringâ saved [14095]

WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributo                                                                                                                                                             rs
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL

Website: http://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 8 services.
        Checked 2 hosts.
        Checked 1 host groups.
        Checked 0 service groups.
        Checked 3 contacts.
        Checked 2 contact groups.
        Checked 116 commands.
        Checked 9 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 2 hosts
        Checked 0 service dependencies
        Checked 0 host dependencies
        Checked 9 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
Restarting nagios (via systemctl):                         [  OK  ]

Re: Blank Error when Attempting to Apply Configuration

Posted: Wed Jan 07, 2015 2:29 pm
by slansing
What is the output of:

Code: Select all

cat /etc/sudoers.d/nagiosxi
We have seen a number of issues related to yours that deal with a duplicate sudoers alias for nagiosxi, which may be the case here. If you do have that file, and there is an alias defined near the top, you can comment it out with a '#' and then try to apply configuration again to see if you get a clean apply, or the correct output.

Re: Blank Error when Attempting to Apply Configuration

Posted: Thu Jan 08, 2015 7:55 pm
by AllrecipesDCO
slansing wrote:What is the output of:

Code: Select all

cat /etc/sudoers.d/nagiosxi
There's nothing in the sudoers.d directory :/
There's a section in the actual Sudoers file for the Nagios accounts, though:

Code: Select all

User_Alias      NAGIOSXI=nagios
User_Alias              NAGIOSXIWEB=apache
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd status
NAGIOSXI ALL = NOPASSWD:/usr/bin/nmap *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/messages
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/httpd/error_log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/mysqld.log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/nmap *
NAGIOSXIWEB ALL = NOPASSWD:/etc/init.d/snmptt restart
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh

Re: Blank Error when Attempting to Apply Configuration

Posted: Thu Jan 08, 2015 8:11 pm
by Box293
Thanks for the sudoers info.

OK, I want to try one more thing:

Go into CCM
Tools > Write Config Files
Click the Delete button
It will say "Successfully deleted all Host / Service Config Files"

Establish an ssh session to your Nagios XI server
Run this:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
Post the output of the reconfigure_nagios.sh command

Re: Blank Error when Attempting to Apply Configuration

Posted: Thu Jan 08, 2015 8:28 pm
by AllrecipesDCO
Box293 wrote:Thanks for the sudoers info.

OK, I want to try one more thing:

Go into CCM
Tools > Write Config Files
Click the Delete button
It will say "Successfully deleted all Host / Service Config Files"

Establish an ssh session to your Nagios XI server
Run this:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
Post the output of the reconfigure_nagios.sh command
It's still showing 2 hosts, even though the delete ran successfully...

Code: Select all

[root@USBOSNAGI01 ~]# cd /usr/local/nagiosxi/scripts/
[root@USBOSNAGI01 scripts]# ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/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=n@gweb' -O nagiosql.login--2015-01-08 17:25:47--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ânagiosql.loginâ

    [ <=>                                                                                                                                                                                                ] 11,693      --.-K/s   in 0.008s

2015-01-08 17:25:47 (1.48 MB/s) - ânagiosql.loginâ saved [11693]

LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
SETUID ROOT OK
RESETTING PERMS
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/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=n@gweb' -O nagiosql.login--2015-01-08 17:25:47--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ânagiosql.loginâ

    [ <=>                                                                                                                                                                                                ] 11,693      --.-K/s   in 0.007s

2015-01-08 17:25:48 (1.62 MB/s) - ânagiosql.loginâ saved [11693]

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-01-08 17:25:48--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ânagiosql.export.monitoringâ

    [  <=>                                                                                                                                                                                               ] 14,772      41.4KB/s   in 0.3s

2015-01-08 17:25:48 (41.4 KB/s) - ânagiosql.export.monitoringâ saved [14772]

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

Website: http://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 8 services.
        Checked 2 hosts.
        Checked 1 host groups.
        Checked 0 service groups.
        Checked 3 contacts.
        Checked 2 contact groups.
        Checked 116 commands.
        Checked 9 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 2 hosts
        Checked 0 service dependencies
        Checked 0 host dependencies
        Checked 9 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
Restarting nagios (via systemctl):                         [  OK  ]

Re: Blank Error when Attempting to Apply Configuration

Posted: Fri Jan 09, 2015 11:25 am
by lmiltchev
I believe this issue is fixed in Nagios XI 2014R2.3 but you can try the following "workaround". Open the "/usr/local/nagiosxi/scripts/restart_nagios_with_export.sh" file in a text editor and modify line 47 by adding "sudo" in front of it so it's going to look like this:

Code: Select all

sudo /etc/init.d/nagios restart
Try to apply configuration again. Let me know if this fixed your issue. If not, I would recommend upgrading to the latest version of XI.

Re: Blank Error when Attempting to Apply Configuration

Posted: Fri Jan 09, 2015 4:39 pm
by AllrecipesDCO
lmiltchev wrote:I believe this issue is fixed in Nagios XI 2014R2.3 but you can try the following "workaround". Open the "/usr/local/nagiosxi/scripts/restart_nagios_with_export.sh" file in a text editor and modify line 47 by adding "sudo" in front of it so it's going to look like this:

Code: Select all

sudo /etc/init.d/nagios restart
Try to apply configuration again. Let me know if this fixed your issue. If not, I would recommend upgrading to the latest version of XI.
Awesome, that worked! Thanks so much for your help!

Re: Blank Error when Attempting to Apply Configuration

Posted: Mon Jan 12, 2015 10:01 am
by cmerchant
Glad that worked for you. We'll go ahead and close this thread. Thanks.