XI System Component Status showing only 3 items OK

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ira
Posts: 10
Joined: Thu Feb 26, 2015 9:47 pm

XI System Component Status showing only 3 items OK

Post by ira »

Hi there,

I've got the following issue after restoring the configuration from one server to another:
XI System Status.PNG
The old system that the import came from is 32-bit Centos 6.6 and the new system is a 64bit RHEL 6.7 install.

Both systems are running xi-2014r2.7. I installed the new NagiosXI from this tar https://assets.nagios.com/downloads/nag ... 2.7.tar.gz and followed the instructions for migrating from 32 to 64 bit.

Issue similar to this one https://support.nagios.com/forum/viewto ... =16&t=9279 but reboot doesn't fix anything. And I don't think there are two Nagios processes running:

Code: Select all

[root@XXXXX etc]# ps aux |grep nagios
nagios    2487  0.0  0.0   8340   804 ?        S    Jan04   0:02 /usr/local/nagios/bin/npcd -d -f /usr/local/nagios/etc/pnp/npcd.cfg
nagios    2771  0.0  0.0  54196   740 ?        Ss   Jan04   0:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
postgres  2825  0.0  0.0 217844  6076 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
postgres  2826  0.0  0.0 217932  6900 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
postgres  2827  0.0  0.0 217844  5980 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
postgres  2828  0.0  0.0 217984  6764 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
postgres  2859  0.0  0.0 217964  6164 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
postgres  2900  0.0  0.0 218036  6616 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
postgres  2904  0.0  0.0 218032  6568 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
postgres  2906  0.0  0.0 217380  5796 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
postgres  2907  0.0  0.0 217380  5796 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
postgres  2922  0.0  0.0 218028  6688 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
postgres  2928  0.0  0.0 218028  6660 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
postgres  3272  0.0  0.0 217960  6580 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
postgres  3327  0.0  0.0 217960  6544 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
postgres  3329  0.0  0.0 217960  6100 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
postgres  3341  0.0  0.0 217452  5808 ?        Ss   Jan04   0:02 postgres: nagiosxi nagiosxi [local] idle
Any suggestions?
You do not have the required permissions to view the files attached to this post.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: XI System Component Status showing only 3 items OK

Post by hsmith »

Can you please try to run the XI upgrade script? That should replace the binaries. When you restore a 32 bit backup to a 64 bit system, it is also replacing the binaries. What happened, is now a bunch of 32 bit binaries are on your 64 bit system, and it's terribly confused.
Former Nagios Employee.
me.
ira
Posts: 10
Joined: Thu Feb 26, 2015 9:47 pm

Re: XI System Component Status showing only 3 items OK

Post by ira »

I've replaced the binaries according to the "Backing-Up-And-Restoring-Nagios-XI.pdf" https://assets.nagios.com/downloads/nag ... ios-XI.pdf
If you are restoring a backup from a different OS version or architecture this can be a problem because the backup is overwriting the
compiled binaries.

...

If you have already deleted the /tmp/nagiosxi install directory do the following:
cd /tmp
wget http://assets.nagios.com/downloads/nagi ... est.tar.gz
tar xzf xi-2011-latest.tar.gz
cd /tmp/nagiosxi
touch installed.mrtg
./A-subcomponents
./build-perms-bin
Although I used https://assets.nagios.com/downloads/nag ... 2.7.tar.gz instead and also needed to run

Code: Select all

sudo ./14-timezone
as well..
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: XI System Component Status showing only 3 items OK

Post by hsmith »

What is the output of the following commands?

Code: Select all

service crond status
ls -l /etc/cron.d/
tail -n25 /var/log/cron
Former Nagios Employee.
me.
ira
Posts: 10
Joined: Thu Feb 26, 2015 9:47 pm

Re: XI System Component Status showing only 3 items OK

Post by ira »

Code: Select all

[root@host ~]# service crond status
crond (pid  2338) is running...

Code: Select all

[root@host ~]# ls -l /etc/cron.d/
total 20
-rw-r--r--  1 root root  113 Sep 22 21:05 0hourly
-rw-r--r--. 1 root root  139 Oct  3  2012 mrtg
-rw-r--r--. 1 root root 1488 Sep 23 09:46 nagiosxi
-rw-------. 1 root root  108 May 21  2015 raid-check
-rw-------. 1 root root  235 Aug  4  2014 sysstat

Code: Select all

[root@host ~]# tail -n25 /var/log/cron
Jan  7 10:08:01 host crond[15139]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:08:01 host crond[15137]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:08:01 host crond[15140]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:08:01 host crond[15138]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:08:01 host crond[15135]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:09:01 host crond[15202]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:09:01 host crond[15205]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:09:01 host crond[15207]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:09:01 host crond[15200]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:09:01 host crond[15203]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:09:01 host crond[15206]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:09:01 host crond[15204]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:09:01 host crond[15201]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:10:01 host crond[15252]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:10:01 host crond[15254]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:10:01 host crond[15257]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:10:01 host crond[15250]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:10:01 host crond[15251]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:10:01 host crond[15256]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:10:01 host crond[15249]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:10:01 host crond[15253]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:10:01 host crond[15255]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:10:01 host CROND[15259]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jan  7 10:10:01 host crond[15248]: (nagios) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jan  7 10:10:01 host CROND[15262]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Looks like PAM permission issues..
ira
Posts: 10
Joined: Thu Feb 26, 2015 9:47 pm

Re: XI System Component Status showing only 3 items OK

Post by ira »

So the nagios account's password has expired.

Code: Select all

[root@host ~]# chage -l nagios
Last password change                                    : Sep 22, 2015
Password expires                                        : Dec 21, 2015
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 7
Maximum number of days between password change          : 90
Number of days of warning before password expires       : 14
Just changed the password to not expire with:

Code: Select all

[root@host ~]# chage -l nagios
Last password change                                    : Sep 22, 2015
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 7
Maximum number of days between password change          : 90
Number of days of warning before password expires       : 14

Edit
Everything but 'Cleaner' went green but now a most changed back to red after a few minutes:
Capture.PNG
You do not have the required permissions to view the files attached to this post.
ira
Posts: 10
Joined: Thu Feb 26, 2015 9:47 pm

Re: XI System Component Status showing only 3 items OK

Post by ira »

Code: Select all

[root@host ~]# chage -l nagios
Last password change                                    : Sep 22, 2015
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : -1
Maximum number of days between password change          : -1
Number of days of warning before password expires       : -1
Think I've fixed it back with the above. Now all Green!

Thanks.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: XI System Component Status showing only 3 items OK

Post by tmcdonald »

For reference, here is mine:

Code: Select all

root@localhost: /usr/local/nagios/etc
$ chage -l nagios
Last password change                                    : Oct 01, 2014
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7
But glad it's working! I'll be closing this thread now, but feel free to open another if you need anything in the future.
Former Nagios employee
Locked