That is likely the case as the version installed via yum has the /usr/local/nagios/xxx directory structure.Could it be that after the upgrade it is not looking in the correct location for the config files?
squirrely73
Posts: 11
Joined: Mon Jul 24, 2017 8:15 am
How did Nagios update on it's own? How can I get running?
-
bolson
Re: How did Nagios update on it's own? How can I get running
-
squirrely73
- Posts: 22
- Joined: Mon Jul 24, 2017 8:15 am
Re: How did Nagios update on it's own? How can I get running
Ok so i ran that and the result is attached.eloyd wrote:It's not clear to me that this is actually the case, but maybe I missed something in the previous postings.
Can you do this:Code: Select all
yum list | grep -i nagios
- Attachments
-
Nagios Results.txt- (9.34 KiB) Downloaded 395 times
Re: How did Nagios update on it's own? How can I get running
Thanks! Now we all know what version(s) we're dealing with!
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
-
squirrely73
- Posts: 22
- Joined: Mon Jul 24, 2017 8:15 am
Re: How did Nagios update on it's own? How can I get running
And to be clear that is where it is right now after reverting to the previous VM snapshot.eloyd wrote:Thanks! Now we all know what version(s) we're dealing with!
I've added the exclude=nagios* into the main /etc/yum.conf file, if it doesn't update in the morning than i guess that fixes the auto-update issue if it does update again then i can grab the updated results and post again.
The main goal is to stop the auto-update for now, then I'll have to look at trying to upgrade and get it working in the future.
-
bolson
Re: How did Nagios update on it's own? How can I get running
Do you have admin (root) privileges for this Nagios server? If so, as root run the following command:
Then for each user that has a crontab, run this command:
And post the results.
Code: Select all
for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; doneCode: Select all
crontab -u USERNAME -e-
squirrely73
- Posts: 22
- Joined: Mon Jul 24, 2017 8:15 am
Re: How did Nagios update on it's own? How can I get running
Resultsbolson wrote:Do you have admin (root) privileges for this Nagios server? If so, as root run the following command:
Then for each user that has a crontab, run this command:Code: Select all
for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done
And post the results.Code: Select all
crontab -u USERNAME -e
- Attachments
-
NagiosCrontab.txt- (1.12 KiB) Downloaded 374 times
-
bolson
Re: How did Nagios update on it's own? How can I get running
Please post the contents of /root/update.sh
-
squirrely73
- Posts: 22
- Joined: Mon Jul 24, 2017 8:15 am
Re: How did Nagios update on it's own? How can I get running
bolson wrote:Please post the contents of /root/update.sh
[root@wc-nagios ~]# cat /root/update.sh
date >> update.log
yum -y update >> update.log
yum -y upgrade >> update.log
shutdown -r now >> update.log
-
bolson
Re: How did Nagios update on it's own? How can I get running
Mystery solved...
Change to:
Running yum update and yum upgrade is redundant as they do the same thing. The difference is that yum upgrade removes obsolete packages.
yum upgrade = yum update --obsoletes
Change to:
Code: Select all
date >> update.log
yum -y -x 'nagios*' upgrade >> update.log
shutdown -r now >> update.log
yum upgrade = yum update --obsoletes
-
squirrely73
- Posts: 22
- Joined: Mon Jul 24, 2017 8:15 am
Re: How did Nagios update on it's own? How can I get running
Thanks bolson, Besides adding the exclusion for nagios* in the /etc/yum.conf file I've also made the changes mentioned above and as of this morning Nagios is still running 3.5.1 and working like a dream.bolson wrote:Mystery solved...
Change to:
Running yum update and yum upgrade is redundant as they do the same thing. The difference is that yum upgrade removes obsolete packages.Code: Select all
date >> update.log yum -y -x 'nagios*' upgrade >> update.log shutdown -r now >> update.log
yum upgrade = yum update --obsoletes
Once again thanks for all the help.
Now when time allows we'll see how the eventual planned upgrade goes.