Page 2 of 2

Re: Nagiosxi Corruption

Posted: Wed Nov 02, 2016 12:55 pm
by avandemore
You can run a reinstall using this process: How to Manually Update Nagios XI

Use the ./updatefunction and try again. Let us know the result.

Re: Nagiosxi Corruption

Posted: Fri Nov 04, 2016 9:09 am
by sanjayhiranisq
Any reply to this ?

Re: Nagiosxi Corruption

Posted: Fri Nov 04, 2016 9:18 am
by rkennedy
See the previous response by @avandemore - did that help Can you show us the output if it did not?

Re: Nagiosxi Corruption

Posted: Fri Nov 04, 2016 12:20 pm
by sanjayhiranisq
EDIT: Please wrap in code tags.

Hi,

This did not help with the issue.
Thank you
Sanjay

Code: Select all

[2016-11-04 15:44:23 root@nyzls114i nagiosxi]# ./upgrade
Archive:  sourceguardian/ixed4.lin.x86-64.zip
  inflating: /usr/lib64/php/modules/ixed.5.3.lin
Sourceguardian extension found for PHP version 5.3
Sourceguardian extension already in php.ini
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
Checking required prereqs...
Please wait...

OLD VERSION: 531
Loaded plugins: fastestmirror, security
Setting up Install Process
Repository centos6.6_updates is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Package automake-1.11.1-4.el6.noarch already installed and latest version
Package autoconf-2.63-5.1.el6.noarch already installed and latest version
Package matching php-mbstring-5.3.3-40.el6_6.x86_64 already installed. Checking for update.
Package 2:nmap-6.47-1.x86_64 already installed and latest version
Package subversion-1.8.13-1.x86_64 already installed and latest version
Nothing to do
Loaded plugins: fastestmirror, security
Setting up Install Process
Repository centos6.6_updates is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Package perl-Test-Simple-0.92-136.el6_6.1.x86_64 already installed and latest version
Package perl-Class-Accessor-0.31-6.1.el6.noarch already installed and latest version
Package perl-Params-Validate-0.92-3.el6.x86_64 already installed and latest version
Package perl-Config-Tiny-2.12-7.1.el6.noarch already installed and latest version
Package perl-Math-Calc-Units-1.07-6.el6.noarch already installed and latest version
Package perl-Number-Format-1.73-3.el6.noarch already installed and latest version
Nothing to do
Loaded plugins: fastestmirror, security
Setting up Install Process
Repository centos6.6_updates is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Package php-pecl-ssh2-0.11.0-7.el6.x86_64 already installed and latest version
Nothing to do
no crontab for nagios
no crontab for root
Copying over new XI directory...
Updating NagiosQL...
NAGIOSQL-POST
Patching NDOUtils...
NDOUtils already patched at level 103
Installing new PNP templates...
Updating init script...
Enabling large install tweaks...
Fixing config file permissions...
Fixing htpasswd permissions...
Checking group memberships...
Installing new XI templates...
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&backend=1&username=nagiosxi&password=n@gweb' -O nagiosql.login--2016-11-04 15:44:45--  http:localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

    [ <=>                                                                                                                                                                    ] 37,975      --.-K/s   in 0.02s

2016-11-04 15:44:45 (1.61 MB/s) - “nagiosql.login” saved [37975]

LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
    [0] => xi_timeperiod_24x7.cfg
)
IMPORTING /usr/local/nagios/etc/import/xi_timeperiod_24x7.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/xi_timeperiod_24x7.cfg' -O nagiosql.import.monitoring
--2016-11-04 15:44:45--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.import.monitoring”

    [ <=>                                                                                                                                                                    ] 116,309     --.-K/s   in 0.02s

2016-11-04 15:44:46 (5.89 MB/s) - “nagiosql.import.monitoring” saved [116309]

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&backend=1&username=nagiosxi&password=n@gweb' -O nagiosql.login--2016-11-04 15:44:46--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

    [ <=>                                                                                                                                                                    ] 37,975      --.-K/s   in 0.02s

2016-11-04 15:44:46 (2.01 MB/s) - “nagiosql.login” saved [37975]

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 'backend=1&cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2016-11-04 15:44:46--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.export.monitoring”

    [ <=>                                                                                                                                                                    ] 22,068      --.-K/s   in 0.01s

2016-11-04 15:44:48 (1.71 MB/s) - “nagiosql.export.monitoring” saved [22068]

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

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

Running pre-flight check on configuration data...

Checking objects...
        Checked 8129 services.
        Checked 590 hosts.
        Checked 94 host groups.
        Checked 24 service groups.
        Checked 190 contacts.
        Checked 7 contact groups.
        Checked 135 commands.
        Checked 195 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 590 hosts
        Checked 0 service dependencies
        Checked 0 host dependencies
        Checked 195 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...
Stopping nagios:.. done.
Starting nagios: done.
Fixing php-mcrypt bug...
Starting httpd:

Nagios XI Upgrade Complete!
---------------------------

Re: Nagiosxi Corruption

Posted: Fri Nov 04, 2016 1:29 pm
by avandemore
Please upload /var/log/httpd/*log, /var/log/mariadb/mariadb.log, /etc/httpd/conf.d/ssl.conf and /etc/httpd/conf.d/nagiosxi.conf

Re: Nagiosxi Corruption

Posted: Mon Nov 07, 2016 12:48 pm
by sanjayhiranisq
This whole thing does not appear to be going anywhere. I want to re-install nagiosxi on a different server this time centos7 ( our new standard) and then just move all the objects over. I want to then use innodb in mysql to make it more reliable and then I will replicate to somewhere else to make sure this never happens again. Please re-issue the licence so that I can do this.

Thank you
Sanjay

Re: Nagiosxi Corruption

Posted: Mon Nov 07, 2016 1:30 pm
by avandemore
You can use this document to do a migration:
Backing Up And Restoring Your Nagios XI System

Please be aware that modifying Nagios DB schema is not covered under support, and may invalidate any support going forward on the product.

Period backups are the recommended route for ensure consistency. We also have this document on HA:
How To Achieve High Availability

Re: Nagiosxi Corruption

Posted: Tue Nov 22, 2016 8:42 am
by sanjayhiranisq
We were able to narrow down the issue to database corruption although the root cause of this will never be known now. The 'fix database' scripts just corrected the structure of the tables but did not deal with missing info/indexes etc...
We rebuilt it on a different server at the same time migrated onto el7.

Re: Nagiosxi Corruption

Posted: Tue Nov 22, 2016 10:56 am
by rkennedy
Weird, there should not have been missing info or indexes at all. Usually the database corruption is just the architecture.

Were you able to get everything working properly on your new setup? Are we good to mark this thread as resolved?