Nagios is active on CLI but not running on Web Interface

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.
Locked
vincdpt
Posts: 2
Joined: Fri Jun 17, 2016 4:07 am

Nagios is active on CLI but not running on Web Interface

Post by vincdpt »

Good morning,

I have a problem with my Nagios configuration. This is the response of service nagios status :

Code: Select all

 root@SRV-SUPERVISION-BT:~# service nagios status -l
● nagios.service - LSB: Starts and stops the Nagios monitoring server
   Loaded: loaded (/etc/init.d/nagios)
   Active: active (running) since ven. 2016-06-17 09:47:46 CEST; 41min ago
  Process: 458 ExecStart=/etc/init.d/nagios start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/nagios.service
           ├─533 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios...
           ├─553 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/...
           ├─555 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/...
           ├─556 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/...
           ├─558 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/...
           ├─559 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/...
           ├─560 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/...
           └─623 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios...

juin 17 09:47:46 SRV-SUPERVISION-BT nagios[533]: nerd: Channel opathchecks r...y
juin 17 09:47:46 SRV-SUPERVISION-BT nagios[533]: nerd: Fully initialized and...!
juin 17 09:47:46 SRV-SUPERVISION-BT nagios[533]: wproc: Successfully registe...r
juin 17 09:47:46 SRV-SUPERVISION-BT nagios[533]: wproc: Registry request: na...3
juin 17 09:47:46 SRV-SUPERVISION-BT nagios[533]: wproc: Registry request: na...8
juin 17 09:47:46 SRV-SUPERVISION-BT nagios[533]: wproc: Registry request: na...9
juin 17 09:47:46 SRV-SUPERVISION-BT nagios[533]: wproc: Registry request: na...6
juin 17 09:47:46 SRV-SUPERVISION-BT nagios[533]: wproc: Registry request: na...0
juin 17 09:47:46 SRV-SUPERVISION-BT nagios[533]: wproc: Registry request: na...5
juin 17 09:47:48 SRV-SUPERVISION-BT nagios[533]: Successfully launched comma...3
Hint: Some lines were ellipsized, use -l to show in full.
But when I'm going on the web interface, Nagios Core is not running :

Image

The configtest command is also right :

Code: Select all

root@SRV-SUPERVISION-BT:~# service nagios configtest

Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL

Website: https://www.nagios.org
Reading configuration data...
   Read main config file okay...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
    Checked 8 services.
    Checked 1 hosts.
    Checked 1 host groups.
    Checked 0 service groups.
    Checked 1 contacts.
    Checked 1 contact groups.
    Checked 24 commands.
    Checked 5 time periods.
    Checked 0 host escalations.
    Checked 0 service escalations.
Checking for circular paths...
    Checked 1 hosts
    Checked 0 service dependencies
    Checked 0 host dependencies
    Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
Object precache file created:
/usr/local/nagios/var/objects.precache
Also, this is the right on /usr/local/nagios/var :

Code: Select all

root@SRV-SUPERVISION-BT:/usr/local/nagios/bin# ls /usr/local/nagios/var -l
total 88
drwxrwsr-x 2 nagios nagios  4096 juin  16 23:59 archives
-rw-r--r-- 1 nagios nagios    34 juin  17 11:00 nagios.configtest
-rw-r--r-- 1 nagios nagios     4 juin  17 09:47 nagios.lock
-rw-r--r-- 1 nagios nagios  3007 juin  17 10:47 nagios.log
-rw-r--r-- 1 nagios nagios 12665 juin  17 09:47 objects.cache
-rw-r--r-- 1 nagios nagios 12665 juin  17 11:00 objects.precache
-rw------- 1 nagios nagios 13062 juin  17 10:47 retention.dat
drwxrwsr-x 2 nagios nagcmd  4096 juin  17 09:47 rw
drwxr-sr-x 3 root   nagios  4096 juin   3 08:28 spool
-rw-rw-r-- 1 nagios nagios 13485 juin  17 11:26 status.dat
I'm on Debian,it's a fresh install and I do not understand the problem. If anyone can help me, thanks in advance.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios is active on CLI but not running on Web Interface

Post by lmiltchev »

What version of Debian are you running? How did you install nagios? What guide/document did you follow?

I am not able to recreate the issue. I installed nagios on Debian 8.

Code: Select all

root@debian:/tmp/nagios-plugins-2.1.1# uname -a
Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
root@debian:/tmp/nagios-plugins-2.1.1# cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
I followed the guide below:
http://www.miloszengel.com/nagios-core- ... -x-jessie/

After this, I had to perform a few additional steps:

Code: Select all

cp /etc/init.d/skeleton /etc/init.d/nagios
Added the following lines to "/etc/init.d/nagios":

Code: Select all

DESC="Nagios"
NAME=nagios
DAEMON=/usr/local/nagios/bin/$NAME
DAEMON_ARGS="-d /usr/local/nagios/etc/nagios.cfg"
PIDFILE=/usr/local/nagios/var/$NAME.lock
Started nagios:

Code: Select all

/etc/init.d/nagios start
example01.PNG
example01.PNG (14.28 KiB) Viewed 3298 times
Be sure to check out our Knowledgebase for helpful articles and solutions!
vincdpt
Posts: 2
Joined: Fri Jun 17, 2016 4:07 am

Re: Nagios is active on CLI but not running on Web Interface

Post by vincdpt »

Hello, thank you for you'r response. My version of debian is :

Code: Select all

root@SRV-SUPERVISION-BT:~# uname -a
Linux SRV-SUPERVISION-BT 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
[1]+  Termine 1               uname -
I have followed this tutorial : http://djibril.developpez.com/tutoriels ... nt/#LIII-A to the third part (III) because after I need a working nagios web-interface.

If I want to follow your tutorial, how I can delete my actual installation ?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios is active on CLI but not running on Web Interface

Post by rkennedy »

As @lmiltchev mentioned, he was able to do this fine on Debian 8. I would follow the above instructions, on a clean, minimal version of Debian 8. It's hard to say what has been done, which is why I would advise against trying to re-install over it and spin up a clean machine.

Let us know if you have further questions about the install.
Former Nagios Employee
Locked