New NagiosXi deployment - NagiosXi services not set up

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Juddnick
Posts: 11
Joined: Fri Nov 14, 2014 1:20 pm

New NagiosXi deployment - NagiosXi services not set up

Post by Juddnick »

Hi - I have just performed a fresh install of NagiosXi and it appears the nagiosxi service and sub-services have not been setup / installed.

The nagiosxi script in /etc/init.d looks completely commented out.

Code: Select all

#!/bin/sh
#
# chkconfig: 345 99 01
# description: NagiosXI subtasks
#
# $Id: nagiosxi,v 1.4 2010/06/14 13:33:48 root Exp $
#

PATH=PATH:/usr/local/bin/
stdserv="sysstat cmdsubsys eventman feedproc nom cleaner reportengine"

# See how we were called.
case "$1" in
        start)
                # Most scripts run frequently
                RETVAL=0
                #for ech in $stdserv; do true
                #       daemon -n $ech -r -u nagios.nagios -a 45 -o /usr/local/nagiosxi/var/${ech}.log -- /usr/bin/php -q /usr/local/nagiosxi/cron/${ech}.php
                #       RETVAL=$(( RETVAL || $? ))
                #done

                # DB maint runs a bit differently
                #daemon -n dbmaint -r -u nagios.nagios -A 1 -L $(( 60 * 5 )) -o /usr/local/nagiosxi/var/dbmaint.log --                  /usr/bin/php -q /usr/local/nagiosxi/cron/dbmaint.php
                #RETVAL=$(( RETVAL || $? ))

                # Recurring downtime script

                ;;
        stop)
                RETVAL=0
                #for ech in $stdserv dbmaint; do true
                #       daemon -n $ech -r --stop -u nagios.nagios
                #       RETVAL=$(( RETVAL || $? ))
                #done
                ;;
        restart)
                RETVAL=0
                ;;
        status)
                RETVAL=0
                #for ech in $stdserv dbmaint; do true
                #       daemon -n $ech -r --running -u nagios.nagios
                #       RETVAL=$(( RETVAL || $? ))
                #done
                ;;
        *)
                echo "Usage: $0 {start|stop|restart|status}"
                RETVAL=1
                ;;
esac
exit $RETVAL
As a result all components in the "System Status" widget in the GUI underneath "Database Backend" are showing as red (Database Maintenance, Command Subsystem etc)

I performed an offline install on RHEL 6.4 (64bit). Access to the GUI seems fine however cannot add any hosts (config push simply perpetually attempts to deploy config without actually doing anything)

Where did I go wrong and how can I correct please?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: New NagiosXi deployment - NagiosXi services not set up

Post by abrist »

That script should be commented out. The red checks you mentioned are usually due to backend connection problems or issues with cron. Lets check cron:

Code: Select all

ps -aef | grep cron
It should resemble:

Code: Select all

root      1589     1  0 Nov13 ?        00:00:08 crond
nagios   15891 15887  0 13:18 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1
nagios   15892 15888  0 13:18 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
nagios   15893 15890  0 13:18 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1
nagios   15895 15886  0 13:18 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1
nagios   15897 15889  0 13:18 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
nagios   15898 15891  0 13:18 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php
nagios   15899 15892  1 13:18 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php
nagios   15900 15893  0 13:18 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php
nagios   15902 15883  0 13:18 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php > /usr/local/nagiosxi/var/cleaner.log 2>&1
nagios   15903 15895  0 13:18 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php
nagios   15905 15897  0 13:18 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php
nagios   15906 15902  1 13:18 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Juddnick
Posts: 11
Joined: Fri Nov 14, 2014 1:20 pm

Re: New NagiosXi deployment - NagiosXi services not set up

Post by Juddnick »

Thanks for responding abrist.

There are none set up by the looks:

# ps -aef | grep cron
root 2197 1 0 Nov14 ? 00:00:12 crond
root 52280 3376 0 13:20 pts/0 00:00:00 grep cron

Were the jobs meant to be set up as part of the install?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: New NagiosXi deployment - NagiosXi services not set up

Post by abrist »

Yes, they were. What is the output of:

Code: Select all

cat /etc/cron.d/nagiosxi
service crond restart
ps -aef | grep cron
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Juddnick
Posts: 11
Joined: Fri Nov 14, 2014 1:20 pm

Re: New NagiosXi deployment - NagiosXi services not set up

Post by Juddnick »

Thanks abrist - looks like cron was not working due to the nagios account not getting set up properly - there was no /var/spool/nagios directory for some reason

I created this, restarted cron and all looks ok so far!

Thank you for your help!
Locked