Page 1 of 2
Nagios CGI File is not working as Expected after the Upgrade
Posted: Fri Jul 14, 2017 8:01 am
by Teja
Hi All,
We have our Nagios (UBUNTU) server hosted in AWS . So recently a week back we ran "do-release-upgrade" command and Since after the upgrade we are having an issue with cgi file i.e "/nagios/cgi-bin/status.cgi?" .We are unable to view the XML,Its directly going to Application page and mind We have changed the our Nagios log path to new location by updating it in nagios.cfg and does this change effects ?? or Do i need to add anything in nagios.cfg file??
current Nagios version is (4.0.2)!!
Thanks in Advance!!!
Re: Nagios CGI File is not working as Expected after the Upg
Posted: Fri Jul 14, 2017 2:20 pm
by dwhitfield
Was your Core compiled from source or installed from distro repos? On what version of ubuntu is nagios running? cat /etc/*-release may be of use. Those questions will help us determine file paths so that we can help you.
Also, can you post your nagios.cfg? That will tell us some additional information about your setup, so that we can do some testing.
Re: Nagios CGI File is not working as Expected after the Upg
Posted: Mon Jul 17, 2017 2:39 am
by Teja
Hi dwhitfield,
Firstly thanks for your reply, Currently Nagios is running on VERSION="14.04.5 LTS, Trusty Tahr" and i'm sorry that i don't have permissions to post my cfg file here. So is there any way that you could guide me the steps and resolve my issue??
Re: Nagios CGI File is not working as Expected after the Upg
Posted: Mon Jul 17, 2017 9:25 am
by tgriep
If you changed the path for where the log files are stored at, make sure the permissions for that folder and the files in it can be accessed by the nagios user and the nagios group.
If the permissions are not set right, that could be one cause of the error.
Also, if the upgrade reset the path back to the default settings, you would have to edit the nagios.cfg file and point it to the new location.
Let us know how it works for you.
Re: Nagios CGI File is not working as Expected after the Upg
Posted: Mon Jul 17, 2017 10:34 am
by Teja
Hi tgriep,
Thanks for your Quick response to my email and Now to say we have changed the log path in nagios.cfg after the Upgrade and we don't have problem with the logs falling to the New Location and new log folder is also having the full permissions.
Re: Nagios CGI File is not working as Expected after the Upg
Posted: Mon Jul 17, 2017 1:05 pm
by tgriep
Can you post a screen shot of what you are clicking on and the error you are having?
Re: Nagios CGI File is not working as Expected after the Upg
Posted: Tue Jul 18, 2017 7:49 am
by Teja
Hi tgriep,
when we are accessing this Nagios Link :-
Request : http://<Nagios-Server-IP>/nagios/cgi-bin/status.cgi?host=HQ-Cams
It should give the Output as follows :-
<?xml version='1.0' ?>
<status>
UP for
</status>
Rather Present Output :-Redirecting to Status UI page.
Hope this info Helps!! Thank You!
Re: Nagios CGI File is not working as Expected after the Upg
Posted: Tue Jul 18, 2017 2:19 pm
by tgriep
When you upgraded the system, did Nagios get upgraded as well?
What you are describing sounds like a 3rd party addon to the system to output in XML and if the system was upgraded, it overwrote that addon.
If it did get upgraded, you could use the JSON CGI instead. Take a look at the link below.
http://labs.nagios.com/2014/06/19/explo ... -7-part-1/
Re: Nagios CGI File is not working as Expected after the Upg
Posted: Wed Jul 19, 2017 5:52 am
by Teja
Hi tgriep,
No Nagios didn't get upgraded,It was just the system. So Is there a way that i can get back the lost XML Plugin??
Thank You!!
Re: Nagios CGI File is not working as Expected after the Upg
Posted: Wed Jul 19, 2017 10:38 am
by tgriep
Without knowing what was used to output the XML data, I don't know how to get it back.
Try searching the Exchange site to find the addon that was installed on your server.
https://exchange.nagios.org/