problem using epel nagios 4.3.4 on CentOS 6

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
aleckeeler
Posts: 3
Joined: Thu Feb 01, 2018 12:31 pm

problem using epel nagios 4.3.4 on CentOS 6

Post by aleckeeler »

I'm having the "Unable to get process status" on the web home page

The install seemed to go OK and have disabled SElinux

starting the service seems to work and I see the following when running ps -eaf

Code: Select all

[root@prometheus nagios]# ps -eaf | grep nagios
nagios    1825     1  0 17:11 ?        00:00:00 /usr/sbin/nagios -d /etc/nagios/nagios.cfg
nagios    1829  1825  0 17:11 ?        00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios    1830  1825  0 17:11 ?        00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios    1831  1825  0 17:11 ?        00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios    1832  1825  0 17:11 ?        00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios    1833  1825  0 17:11 ?        00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios    1834  1825  0 17:11 ?        00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios    1837  1825  0 17:11 ?        00:00:00 /usr/sbin/nagios -d /etc/nagios/nagios.cfg
root      2135  2043  0 17:23 pts/1    00:00:00 grep nagios
So I can see where init started the daemon 1825 and it seems to have forked PID 1837 but the web page just gives that Unable to get process status

Can't see anything obvious in the nagios.log

Code: Select all

[1517505097] Nagios 4.3.4 starting... (PID=1825)
[1517505097] Local time is Thu Feb 01 17:11:37 GMT 2018
[1517505097] LOG VERSION: 2.0
[1517505097] qh: Socket '/var/spool/nagios/cmd/nagios.qh' successfully initialized
[1517505097] qh: core query handler registered
[1517505097] nerd: Channel hostchecks registered successfully
[1517505097] nerd: Channel servicechecks registered successfully
[1517505097] nerd: Channel opathchecks registered successfully
[1517505097] nerd: Fully initialized and ready to rock!
[1517505097] wproc: Successfully registered manager as @wproc with query handler
[1517505097] wproc: Registry request: name=Core Worker 1829;pid=1829
[1517505097] wproc: Registry request: name=Core Worker 1830;pid=1830
[1517505097] wproc: Registry request: name=Core Worker 1832;pid=1832
[1517505097] wproc: Registry request: name=Core Worker 1831;pid=1831
[1517505097] wproc: Registry request: name=Core Worker 1833;pid=1833
[1517505097] wproc: Registry request: name=Core Worker 1834;pid=1834
[1517505097] Successfully launched command file worker with pid 1837
But having been googling for about an hour (hence the SElinux being disabled) I still can't get it started

Code: Select all

[root@prometheus nagios]# getenforce
Disabled
Tried running the daemon with -v and got

Code: Select all

[root@prometheus nagios]# /usr/sbin/nagios -v /etc/nagios/nagios.cfg

Nagios Core 4.3.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2017-08-24
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
Have the following epel 6 rpms installed (not sure what plugins we might want so installed all)

Code: Select all

nagios-common-4.3.4-7.el6.x86_64
nagios-plugins-perl-2.2.1-4git.el6.x86_64
nagios-plugins-ntp-perl-2.2.1-4git.el6.x86_64
nagios-plugins-breeze-2.2.1-4git.el6.x86_64
nagios-plugins-flexlm-2.2.1-4git.el6.x86_64
nagios-plugins-file_age-2.2.1-4git.el6.x86_64
nagios-plugins-mailq-2.2.1-4git.el6.x86_64
nagios-plugins-ups-2.2.1-4git.el6.x86_64
nagios-plugins-dhcp-2.2.1-4git.el6.x86_64
nagios-plugins-cluster-2.2.1-4git.el6.x86_64
nagios-plugins-mrtgtraf-2.2.1-4git.el6.x86_64
nagios-plugins-time-2.2.1-4git.el6.x86_64
nagios-plugins-ldap-2.2.1-4git.el6.x86_64
nagios-plugins-real-2.2.1-4git.el6.x86_64
nagios-plugins-procs-2.2.1-4git.el6.x86_64
nagios-plugins-mysql-2.2.1-4git.el6.x86_64
nagios-plugins-overcr-2.2.1-4git.el6.x86_64
nagios-plugins-oracle-2.2.1-4git.el6.x86_64
nagios-plugins-hpjd-2.2.1-4git.el6.x86_64
nagios-plugins-disk-2.2.1-4git.el6.x86_64
nagios-plugins-ping-2.2.1-4git.el6.x86_64
nagios-plugins-http-2.2.1-4git.el6.x86_64
nagios-plugins-smtp-2.2.1-4git.el6.x86_64
nagios-plugins-sensors-2.2.1-4git.el6.x86_64
nagios-plugins-fping-2.2.1-4git.el6.x86_64
nagios-plugins-game-2.2.1-4git.el6.x86_64
nagios-plugins-pgsql-2.2.1-4git.el6.x86_64
nagios-4.3.4-7.el6.x86_64
nagios-plugins-2.2.1-4git.el6.x86_64
nagios-plugins-snmp-2.2.1-4git.el6.x86_64
nagios-plugins-disk_smb-2.2.1-4git.el6.x86_64
nagios-plugins-wave-2.2.1-4git.el6.x86_64
nagios-plugins-ircd-2.2.1-4git.el6.x86_64
nagios-plugins-rpc-2.2.1-4git.el6.x86_64
nagios-plugins-dummy-2.2.1-4git.el6.x86_64
nagios-plugins-nagios-2.2.1-4git.el6.x86_64
nagios-plugins-ntp-2.2.1-4git.el6.x86_64
nagios-plugins-load-2.2.1-4git.el6.x86_64
nagios-plugins-ssh-2.2.1-4git.el6.x86_64
nagios-plugins-tcp-2.2.1-4git.el6.x86_64
nagios-plugins-mrtg-2.2.1-4git.el6.x86_64
nagios-plugins-by_ssh-2.2.1-4git.el6.x86_64
nagios-plugins-nwstat-2.2.1-4git.el6.x86_64
nagios-plugins-nt-2.2.1-4git.el6.x86_64
nagios-plugins-users-2.2.1-4git.el6.x86_64
nagios-plugins-icmp-2.2.1-4git.el6.x86_64
nagios-plugins-log-2.2.1-4git.el6.x86_64
nagios-plugins-ide_smart-2.2.1-4git.el6.x86_64
nagios-plugins-dns-2.2.1-4git.el6.x86_64
nagios-plugins-dig-2.2.1-4git.el6.x86_64
nagios-plugins-swap-2.2.1-4git.el6.x86_64
nagios-plugins-all-2.2.1-4git.el6.x86_64
Any suggestions ?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: problem using epel nagios 4.3.4 on CentOS 6

Post by dwhitfield »

What's the output of the following:

Code: Select all

    ls -la /usr/local/nagios/sbin/statusjson.cg
    ls -la /usr/local/nagios/sbin/tac.cgi
    sudo sestatus
    df -i
    df -h
aleckeeler
Posts: 3
Joined: Thu Feb 01, 2018 12:31 pm

Re: problem using epel nagios 4.3.4 on CentOS 6

Post by aleckeeler »

OK this was installed using the fedora epel rpm and the locations of the deliverables are different from what you posted, but using rpm -ql to track them down:

Code: Select all

[root@prometheus nagios]# ls -la /usr/lib64/nagios/cgi-bin/statusjson.cgi
-rwxrwxr-x. 1 root root 312304 Nov 24 17:49 /usr/lib64/nagios/cgi-bin/statusjson.cgi
[root@prometheus nagios]# ls -la /usr/lib64/nagios/cgi-bin/tac.cgi
-rwxrwxr-x. 1 root root 254160 Nov 24 17:49 /usr/lib64/nagios/cgi-bin/tac.cgi
[root@prometheus nagios]# sestatus
SELinux status:                 disabled
[root@prometheus nagios]# df -i
Filesystem             Inodes   IUsed    IFree IUse% Mounted on
/dev/mapper/vg_prometheus-lv_root
                      2334720   36370  2298350    2% /
tmpfs                  240208       1   240207    1% /dev/shm
/dev/sda1              128016      46   127970    1% /boot
<Device>:/vol/Corporate/Staff-Homes/adk
                     25638255 2157015 23481240    9% /nexor/users/adk
[root@prometheus nagios]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_prometheus-lv_root
                       35G  1.6G   32G   5% /
tmpfs                 939M     0  939M   0% /dev/shm
/dev/sda1             477M   87M  365M  20% /boot
<Device>:/vol/Corporate/Staff-Homes/adk
                      298G  243G   55G  82% /nexor/users/adk
Alec
aleckeeler
Posts: 3
Joined: Thu Feb 01, 2018 12:31 pm

Re: problem using epel nagios 4.3.4 on CentOS 6

Post by aleckeeler »

OK have found the solution

Someone else must have tried using nagios at some time and had added a nagios user into our NIS users

So when I installed the nagios rpm it didn't create or use a local nagios user, but attempted to use the NIS account that had been disabled

I re-installed nagios with NIS turned off (service ypbind stop) so on install it did create a local nagios user and it now starts OK running as this local nagios account

Alec
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: problem using epel nagios 4.3.4 on CentOS 6

Post by npolovenko »

@aleckeeler, Thanks for sharing the solution with us. May I go ahead and lock this thread for you?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked