Page 1 of 1

Nagios upgrading from 2014 r1.5 to r2.0 nagiosql login fail

Posted: Sat Nov 22, 2014 3:57 pm
by krobertson71
All kinds of issues here. Upgrades in the past have always went smoothly. The upgrade process was running normally, gets to the end-ish and BAM Nagiosql Login Failed! BTW the upgrade process is still in a running state even though at the bottom it says I am running 2.0.

Also, Nagios is working normally otherwise. I did a service nagios stop then start.. all good. Can't shutdown httpd though.

I logged into the server as myself and the did "sudo su - nagios" and now I get this:

Code: Select all

[kar54@nagiast01 sbin]$ sudo su - nagios
sudo: >>> /etc/sudoers: Alias `NAGIOSXI' already defined near line 90 <<<
sudo: >>> /etc/sudoers: Alias `NAGIOSXIWEB' already defined near line 90 <<<
sudo: parse error in /etc/sudoers near line 90
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
[kar54@nagiast01 sbin]$ 

Posting screenshots as well. Attached upgrade.log.

Re: Nagios upgrading from 2014 r1.5 to r2.0 nagiosql login f

Posted: Sat Nov 22, 2014 6:44 pm
by krobertson71
The sudoers issue was corrected by a Unix admin. Turns out they moved to the new structure /etc/sudoers.d/username.

Once he did that I was able to sudo to the nagios user again. Something happened during the upgrade as he said it looked like the nagios user was trying to write to /etc/sudoers during the process.

Is there a way around this since that is no longer the location?

Now when I go to Admin I do not see the "There is an update available". But... if I click on 'Check for updates' on the left side menu, it still shows "Update in progress" and the last line is Nagiosql login failed!

Would restoring the backup taken by the upgrade process at the beginning fix things?

Re: Nagios upgrading from 2014 r1.5 to r2.0 nagiosql login f

Posted: Sat Nov 22, 2014 8:44 pm
by krobertson71
I have tried reapplying previous configurations to no avail. Things are starting to fall down...

Re: Nagios upgrading from 2014 r1.5 to r2.0 nagiosql login f

Posted: Sat Nov 22, 2014 11:40 pm
by krobertson71
Think I was able to get it fixed.

Turned out / only had 1% of space left, even though the upgrade did not warn of space issues.. might not have been though..

The Sudoers file issue is still an issue as Redhat is switching to /etc/sudoers.d/username versus /etc/sudoers - unix admin put this server back but still need to work around this if you can.

What I did to get everything back to normal:

Did some research and looking at nagios scripts and found the upgrade_to_latest.sh. Looked it over and decided "why not at this point".

I downloaded xi-latest tarball and put it in tmp and then executed "upgrade_to_latest.sh -t -f /tmp/xi-latestxxxx

This is how it ran

Code: Select all

---- Starting Nagios XI Backup ----
Backing up Core Config Manager (NagiosQL)...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
tar: /usr/local/nagios/var/ndo.sock: socket ignored
tar: /usr/local/nagios/var/rw/nagios.qh: socket ignored
Backing up Nagios XI...
tar: Removing leading `/' from member names
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up MySQL databases...
Backing up PostgresQL databases...
Backing up logrotate config files...
Backing up Apache config files...
Compressing backup...
 
===============
BACKUP COMPLETE
===============
Backup stored in /store/backups/nagiosxi/autoupgrade_backup..tar.gz

---- Starting Nagios XI Upgrade ----
Cleaning up temp directory...
Downloading Latest Nagios XI Tarball...
And that's it. Then just said Upgrade completed successfully. Now when I looked in the upgrade directory there is no entry for todays date so sure that is due to this rough process to get back on track.

Assuming that the first run from the gui did most of the work and either because of the sudoers issues, or something else weird, caused the "nagiosql login failed!" from my first post. This might explain why the log above just shows Downloading Latest XI Tarball, even though I had it in /tmp and pointed the script there.

Anyway, I did a quick check.. The Host creation where you select hostgroups and contacts, the boxes are bigger. Did not notice anything differnt in Metrics but I need to look over the changelog again.

In your opinion did I get through it ok should I be in good shape? All checks are running and graphing... everything seems to be working.

Anything you can think of that I should be checking to make sure something did not get upgraded properly?

****UPDATE****
Added searchable host field in graph explorer -JO -- not seeing this in Graph Explorer. See it in Host Graphs though. Am I looking in the wrong place?

Also in the "Scalable Performance Graph" when I select the 4 hour timeframe, it goes all wonky.. In the screenshot below you will see it has Jan 1 in it. All other timeframes work properly.

Re: Nagios upgrading from 2014 r1.5 to r2.0 nagiosql login f

Posted: Mon Nov 24, 2014 3:05 pm
by abrist
krobertson71 wrote:Added searchable host field in graph explorer -JO -- not seeing this in Graph Explorer. See it in Host Graphs though. Am I looking in the wrong place?
The dropdown doubles as a search field.
krobertson71 wrote:Also in the "Scalable Performance Graph" when I select the 4 hour timeframe, it goes all wonky.
Bug confirmed and reported internally: TASK ID 4519

Re: Nagios upgrading from 2014 r1.5 to r2.0 nagiosql login f

Posted: Mon Nov 24, 2014 3:46 pm
by krobertson71
Can someone address the sudoer issue? Or should I start a new thread?

Re: Nagios upgrading from 2014 r1.5 to r2.0 nagiosql login f

Posted: Mon Nov 24, 2014 5:36 pm
by tmcdonald
We would need to probably file a feature/bug report for that. Our devs are pretty good with things like that, considering MRTG and SNMPTT do something similar with configs now. I'll go ahead and put that in.

Edit: Feature request ID 4526 filed.

Re: Nagios upgrading from 2014 r1.5 to r2.0 nagiosql login f

Posted: Tue Apr 07, 2015 3:46 pm
by scottwilkerson
Update, this was fixed in 2014R2.1