Page 1 of 1

Nagios Core: Not Running

Posted: Wed Sep 09, 2015 12:52 pm
by yahootoby
I installed Nagios from source on Ubuntu 14.04. I did get past some of the errors with the official documentation with this help: http://wellsie.net/p/512/#comment-121447 (to include running "a2enmod cgi" and restarting Apache).

I can start Nagios, and it seems to start fine (also -v reports no errors).

The problem: the home page says, "Nagios Core: Not running" (with a red X). If I click on any of the status pages, I get a bunch of weirdness:

ELF>Ö@@hÔ@8 @@@@@@øø88@8@@@œÍœÍ ÎÎcÎcXo (Î(Îc(ÎcÐÐTT@T@DDPåtd,m,mC,mC¬ ¬ QåtdRåtdÎÎcÎcðð/lib64/ld-linux-x86-64.so.2GNUGNU¤Ò Û,ÍU™[F_œ•è¿SO €OP)ŒgUaE|°Ì®)@‡Ò¶?Þ”m¨ì#¾"`%1 *þn~u¨Q™‰Ç XŸf:t@‘é õ·8Êy¼YÅP.h[Zºå‰˜H;ې9tf_ ÓcÄ(

That's just the first line. It goes on for a log while.

Here's what's in my log (notice no errors):

Code: Select all

[1441820182] Nagios 4.1.1 starting... (PID=792)
[1441820182] Local time is Wed Sep 09 17:36:22 UTC 2015
[1441820182] LOG VERSION: 2.0
[1441820182] qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
[1441820182] qh: core query handler registered
[1441820182] nerd: Channel hostchecks registered successfully
[1441820182] nerd: Channel servicechecks registered successfully
[1441820182] nerd: Channel opathchecks registered successfully
[1441820182] nerd: Fully initialized and ready to rock!
[1441820182] wproc: Successfully registered manager as @wproc with query handler
[1441820183] wproc: Registry request: name=Core Worker 794;pid=794
[1441820183] wproc: Registry request: name=Core Worker 796;pid=796
[1441820183] wproc: Registry request: name=Core Worker 797;pid=797
[1441820183] wproc: Registry request: name=Core Worker 795;pid=795
[1441820183] Successfully launched command file worker with pid 800
ps aux | grep nagios:

Code: Select all

nagios     792  0.0  0.2  23520  2772 ?        Ss   17:36   0:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios     794  0.0  0.2  10828  2332 ?        S    17:36   0:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios     795  0.0  0.2  10828  2308 ?        S    17:36   0:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios     796  0.0  0.2  10828  2316 ?        S    17:36   0:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios     797  0.0  0.2  10828  2288 ?        S    17:36   0:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios     800  0.0  0.0  23068   456 ?        S    17:36   0:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios    1435  0.0  0.0   6556   744 ?        S    17:46   0:00 /usr/local/nagios/libexec/check_ping -H 127.0.0.1 -w 100.0,20% -c 500.0,60% -p 5
nagios    1436  0.0  0.0   6508   696 ?        S    17:46   0:00 /bin/ping -n -U -w 10 -c 5 127.0.0.1
root      1440  0.0  0.2  11752  2172 pts/0    S+   17:46   0:00 grep nagios
Help?

Re: Nagios Core: Not Running

Posted: Wed Sep 09, 2015 1:56 pm
by tmcdonald
Definitely an Apache setting, not Nagios.

What do you have in your /var/log/apache2/error.log?

Re: Nagios Core: Not Running

Posted: Wed Sep 09, 2015 2:55 pm
by yahootoby
Nothing unusual in the Apache error log. I have noticed that sometimes the cgi's run properly, and sometimes they don't. I can click on "Problems", and see what I expect. If I click on hosts or services then I get garbage.

Re: Nagios Core: Not Running

Posted: Wed Sep 09, 2015 4:52 pm
by tgriep
Run this and post back to see if the CGI's are setup correctly.

Code: Select all

 ll /usr/local/nagios/sbin
Can you upload this file?

Code: Select all

/etc/httpd/conf.d/nagios.conf

Re: Nagios Core: Not Running

Posted: Wed Sep 09, 2015 4:53 pm
by ssax
What is the output of this page?

Code: Select all

http://YOURCORESERVER/nagios/cgi-bin/statusjson.cgi?query=programstatus

Re: Nagios Core: Not Running

Posted: Wed Sep 09, 2015 5:09 pm
by yahootoby
Thanks everyone, but I decided to delete Nagios, and re-install from scratch. It works fine now.