Page 1 of 1

systemctl status nagiosxi

Posted: Fri Dec 15, 2017 4:28 am
by andyb4u
Hi,

When I run

Code: Select all

systemctl status nagiosxi
It shows as active (exited).

Code: Select all

sudo systemctl status nagiosxi
● nagiosxi.service - SYSV: NagiosXI subtasks
   Loaded: loaded (/etc/rc.d/init.d/nagiosxi; bad; vendor preset: disabled)
   Active: active (exited) since Fri 2017-12-15 09:12:36 GMT; 9min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1360 ExecStart=/etc/rc.d/init.d/nagiosxi start (code=exited, status=0/SUCCESS)

Dec 15 09:12:36 PR-ITA-NAGV01.nigov.net systemd[1]: Starting SYSV: NagiosXI subtasks...
Dec 15 09:12:36 PR-ITA-NAGV01.nigov.net systemd[1]: Started SYSV: NagiosXI subtasks.
I'm just wondering is this the correct state and what it actually means?

Re: systemctl status nagiosxi

Posted: Fri Dec 15, 2017 12:27 pm
by kyang
That is normal, it's defined as the Nagios XI subtasks.

It's the cron/script that does DB maintenance.

Here's the script that its running under the cron

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 long as it's working you are fine.

Anymore questions or are we okay to lock this up?

Re: systemctl status nagiosxi

Posted: Thu Dec 21, 2017 5:20 am
by andyb4u
Thanks for that info. It can be locked up.