Nagios Core Update Available Banner Not Displayed

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Master_Chief_Jon
Posts: 23
Joined: Fri Nov 19, 2010 1:31 pm

Re: Nagios Core Update Available Banner Not Displayed

Post by Master_Chief_Jon »

On 1/17 I told you that I went back to v4.0.1, and that's what's displayed on the status.cgi and the home page. But I noticed this morning that the status.dat file still shows "version=4.0.2". Here is the first few lines of the status.dat file:

Code: Select all

########################################
#          NAGIOS STATUS FILE
#
# THIS FILE IS AUTOMATICALLY GENERATED
# BY NAGIOS.  DO NOT MODIFY THIS FILE!
########################################

info {
        created=1390314319
        version=4.0.2
        last_update_check=1390252677
        update_available=0
        last_version=4.0.2
        new_version=4.0.2
        }
I don't think that our testing is going the be useful until we get that resolved. What do I need to do to get the status.dat file to show v4.0.1?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagios Core Update Available Banner Not Displayed

Post by sreinhardt »

Did you happen to remove the status.dat file when reverting versions? Typically nagios will leave changes like that alone, and only do actual status updates from my understanding. My suggestions would be either: (re)move status.dat and allow generation of a new one, or modify the version= line to 4.0.1 to properly reflect this. I will verify in the code that this is the case, regarding it not changing\verifying this change, as that should be corrected.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Master_Chief_Jon
Posts: 23
Joined: Fri Nov 19, 2010 1:31 pm

Re: Nagios Core Update Available Banner Not Displayed

Post by Master_Chief_Jon »

Interesting. I looked at the top 20 lines of retention.dat and it shows v4.0.1. So I stopped the nagios service and started it, and the new status.dat file now shows the proper version number.

Code: Select all

########################################
#          NAGIOS STATUS FILE
#
# THIS FILE IS AUTOMATICALLY GENERATED
# BY NAGIOS.  DO NOT MODIFY THIS FILE!
########################################

info {
        created=1390395994
        version=4.0.1
        last_update_check=1390345941
        update_available=1
        last_version=4.0.1
        new_version=4.0.2
        }
So maybe after down-reving Nagios, I needed to restart it a second time (I only restarted it once)?

OK, what next? Would you like to remote to my PC and look at it directly?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios Core Update Available Banner Not Displayed

Post by tmcdonald »

Remote sessions are typically reserved for current customers, and those are usually used for Nagios XI.

Is the banner still not showing?
Former Nagios employee
Master_Chief_Jon
Posts: 23
Joined: Fri Nov 19, 2010 1:31 pm

Re: Nagios Core Update Available Banner Not Displayed

Post by Master_Chief_Jon »

Regarding remote support, I understand.

The banner is not displayed right now, but I would like to wait 24 hours and try it again (since the update check happens once per 24 hour period).
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios Core Update Available Banner Not Displayed

Post by slansing »

Okay, let us know if anything changes. In the meantime we will brainstorm and test on our end when we get a chance to try and reproduce again.
Master_Chief_Jon
Posts: 23
Joined: Fri Nov 19, 2010 1:31 pm

Re: Nagios Core Update Available Banner Not Displayed

Post by Master_Chief_Jon »

OK, the banner is still not displayed, and according to the status.dat file, the last update check was performed "Wed, 22 Jan 2014 21:13:11 GMT". Here is the top of the status.dat file:

Code: Select all

########################################
#          NAGIOS STATUS FILE
#
# THIS FILE IS AUTOMATICALLY GENERATED
# BY NAGIOS.  DO NOT MODIFY THIS FILE!
########################################

info {
        created=1390488898
        version=4.0.1
        last_update_check=1390425191
        update_available=1
        last_version=4.0.1
        new_version=4.0.2
        }

Note that if I modify the code in the main.php file so that the line which was originally: //$updateinfo['update_available']=true; is changed to: $updateinfo['update_available']=true;
(in other words un-commenting that line), then the banner is displayed. This tells me that the value "update_available" is not being correctly set to true, and when I override it to true, the banner is displayed.

What next?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagios Core Update Available Banner Not Displayed

Post by sreinhardt »

Interesting, I would tend to agree. If it has not been suggested already, I would say post a bug on tracker.nagios.org. Otherwise when I need a break from nagios-plugins this weekend, I will take a look into the core code for this.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Master_Chief_Jon
Posts: 23
Joined: Fri Nov 19, 2010 1:31 pm

Re: Nagios Core Update Available Banner Not Displayed

Post by Master_Chief_Jon »

OK, I submitted it to tracker.nagios.org. It's bug number 563
http://tracker.nagios.org/view.php?id=563
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios Core Update Available Banner Not Displayed

Post by lmiltchev »

Thanks for submitting the bug report!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked