Nagios CGI File is not working as Expected after the Upgrade

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.
Teja
Posts: 53
Joined: Tue Jun 13, 2017 8:13 am

Nagios CGI File is not working as Expected after the Upgrade

Post 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!!!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagios CGI File is not working as Expected after the Upg

Post 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.
Teja
Posts: 53
Joined: Tue Jun 13, 2017 8:13 am

Re: Nagios CGI File is not working as Expected after the Upg

Post 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??
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios CGI File is not working as Expected after the Upg

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Teja
Posts: 53
Joined: Tue Jun 13, 2017 8:13 am

Re: Nagios CGI File is not working as Expected after the Upg

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios CGI File is not working as Expected after the Upg

Post by tgriep »

Can you post a screen shot of what you are clicking on and the error you are having?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Teja
Posts: 53
Joined: Tue Jun 13, 2017 8:13 am

Re: Nagios CGI File is not working as Expected after the Upg

Post 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!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios CGI File is not working as Expected after the Upg

Post 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/
Be sure to check out our Knowledgebase for helpful articles and solutions!
Teja
Posts: 53
Joined: Tue Jun 13, 2017 8:13 am

Re: Nagios CGI File is not working as Expected after the Upg

Post 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!!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios CGI File is not working as Expected after the Upg

Post 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/
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked