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.
abrist wrote:They are just warnings. Lets see if it works. If not, it is time to post a bug report at: tracker.nagios.org. But try to reinstall first anyways.
Well that seems to have worked. I ran the configure script, then make all (still receivedthe warnings), and make install.
then I ran
Nagios Core 4.0.0
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-20-2013
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Warning: use_embedded_perl_implicitly is deprecated and will be removed.
Warning: enable_embedded_perl is deprecated and will be removed.
Warning: p1_file is deprecated and will be removed.
Warning: sleep_time is deprecated and will be removed.
Warning: external_command_buffer_slots is deprecated and will be removed. All commands are always processed upon arrival
Warning: command_check_interval is deprecated and will be removed. Commands are always handled on arrival
Read main config file okay...
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/na
giosql/hosttemplates.cfg', starting at line 14)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local
/nagiosql/servicetemplates.cfg', starting at line 14)
---Redacted---
Running pre-flight check on configuration data...
Checking objects...
Checked 221 services.
Checked 42 hosts.
Checked 23 host groups.
Checked 13 service groups.
Checked 16 contacts.
Checked 4 contact groups.
Checked 41 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 42 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
and when I ran
/etc/init.d/nagios restart
It was successful.
I am a little uncomfortable without the updated init file though.
mlong wrote:I am a little uncomfortable without the updated init file though.
In what way?
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.
You could always compare them, though as far as I am aware, there were no big changes to init options in core 4.
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.
This happens on a clean install as well. The init file is pointing to the wrong place by default. I had the same issue and rolled back using snapshots. I stood up a new VM with Ubuntu server 12.04 and followed the quick start steps for Ubuntu and it gave the exact same issue. The problem here obviously being that if someone doesn't have a backup, or if someone is trying to do a fresh install of Core 4.0.0 on Ubuntu, it won't work. Here's the bug report: http://tracker.nagios.org/view.php?id=460
Seems like a lot of people are having the issue, or issues resulting from the same underlying issue.
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.
mlong: Can you post the init script you are currently using in code wraps?
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.
I'm also thinking about cloning my current setup, and upgrading without doing the make install-init command and seeing if it still works. If I get around to it in the next couple of days, I'll post my results.
#! /bin/sh
### BEGIN INIT INFO
# Provides: nagios
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop Nagios monitoring server
# Description: Nagios is a service monitoring system
### END INIT INFO
# Author: Foo Bar <roger@steneteg.org>
#
# Please remove the "Author" lines above and replace them
# with your own name if you copy and modify this script.
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Nagios monitoring system"
NAME=nagios
PREFIX=/srv/nagios
STATEDIR=/var/nagios
CONFIGDIR=/etc/nagios
CONFIGFILE="$CONFIGDIR/nagios.cfg"
DAEMON="${PREFIX}/bin/${NAME}"
DAEMON_ARGS="-d $CONFIGFILE"
SCRIPTNAME=/etc/init.d/$NAME
PIDFILE=/var/run/$NAME.pid
USER="nagios"
GROUP="nagios"
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions
check_config() {
RESULTFILE="$STATEDIR/configcheck$$"
CHECKRESULT=`$DAEMON -v $CONFIGFILE > $RESULTFILE`
WARN=`grep ^"Total Warnings:" $RESULTFILE | awk -F: '{print $2}' |sed s/' '//g`
ERR=`grep ^"Total Errors:" $RESULTFILE | awk -F: '{print $2}' |sed s/' '//g`
if test "${WARN}" = "0" && test "${ERR}" = "0"; then
echo "OK - Configuration check verified"
return 0
else
cat $RESULTFILE
exit 8
fi
}
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
test -x $DAEMON || exit 2
test -f $CONFIGGILE || exit 2
if test "$1" = "checkconfig"; then
check_config
fi
echo -n "Starting $NAME .."
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null || return 1
start-stop-daemon --start --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 2
echo ". $NAME started"
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
echo -n "Stopping $NAME .."
# start-stop-daemon --stop --quiet --retry=5 --pidfile $PIDFILE --name $NAME
# RETVAL="$?"
# [ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon --stop --quiet --oknodo --retry=5 --exec $DAEMON
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
echo ". $NAME stopped"
return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
check_config
# This does not seem to be working
#start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE --name $NAME
echo "There is something wrong with the reload function, use restart instead"
return 0
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start "checkconfig"
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
reload)
#
# If do_reload() is not implemented then leave this commented out
# and leave 'force-reload' as an alias for 'restart'.
#
log_daemon_msg "Reloading $DESC" "$NAME"
do_reload
log_end_msg $?
;;
restart)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
check_config
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
exit 3
;;
esac