https://gist.github.com/Sicnus/9fa52646 ... 7d5238caf5
Code: Select all
[root@all-nagios-app-ops-00 ~]# service nagios start
Starting nagios: Running configuration check... /etc/init.d/nagios: line 82: 10910 Segmentation fault $NagiosBin -vp $NagiosCfgFile > "$TMPFILE"
Nagios Core 4.4.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2018-06-25
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Warning: external_command_buffer_slots is deprecated and will be removed. All commands are always processed upon 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/nagios/etc/objects/router-170_nagios2.cfg', starting at line 1)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/proxy-52_nagios2.cfg', starting at line 1)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/shared-server.cfg', starting at line 3)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/noemail-service.cfg', starting at line 2)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/netbk-service.cfg', starting at line 2)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/robins-proxy_nagios2.cfg', starting at line 1)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/generic-host_nagios2.cfg', starting at line 3)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/show_users-service_nagios2.cfg', starting at line 2)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/idm-service.cfg', starting at line 2)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/windows-service.cfg', starting at line 2)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/windows-service.cfg', starting at line 29)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/idm-server.cfg', starting at line 3)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/generic-service_nagios2.cfg', starting at line 2)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/router-161_nagios2.cfg', starting at line 1)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/proxy-53_nagios2.cfg', starting at line 1)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/windows-server.cfg', starting at line 3)
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in
Any help would be greatly appreciated.
Cheers,
Trae
Update: One of our sysadmins suggested I comment out the section in the configs that point to: failure_prediction_enabled
I've done this and now the only thing that happens when I start and start nagios is:
[root@all-nagios-app-ops-00 ~]# service nagios start
Starting nagios: Running configuration check... /etc/init.d/nagios: line 82: 14741 Segmentation fault $NagiosBin -vp $NagiosCfgFile > "$TMPFILE"
The section of /etc/init.d/nagios starting at line 82:
Code: Select all
check_config ()
{
if test "$checkconfig" != "true"; then
return 0
fi
echo -n "Running configuration check... "
/bin/rm -f "$NagiosCfgtestFile";
if test -e "$NagiosCfgtestFile"; then
echo "ERROR: Could not delete '$NagiosCfgtestFile'"
exit 8
fi
if ! su $NagiosUser -c "touch $NagiosCfgtestFile"; then
echo "ERROR: Could not create or update '$NagiosCfgtestFile'"
exit 8
fi
TMPFILE=$(mktemp /tmp/.configtest.XXXXXXXX)
$NagiosBin -vp $NagiosCfgFile > "$TMPFILE"
WARN=`grep ^"Total Warnings:" "$TMPFILE" |awk -F: '{print \$2}' |sed s/' '//g`
ERR=`grep ^"Total Errors:" "$TMPFILE" |awk -F: '{print \$2}' |sed s/' '//g`
if test "$WARN" = "0" && test "${ERR}" = "0"; then
echo "OK - Configuration check verified" > $NagiosCfgtestFile
/bin/rm "$TMPFILE"
return 0
elif test "${ERR}" = "0"; then
# Write the errors to a file we can have a script watching for.
echo "WARNING: Warnings in config files - see log for details: $NagiosCfgtestFile" > $NagiosCfgtestFile
egrep -i "(^warning|^error)" "$TMPFILE" >> $NagiosCfgtestFile
/bin/rm "$TMPFILE"
return 0
else
# Write the errors to a file we can have a script watching for.
echo "ERROR: Errors in config files - see log for details: $NagiosCfgtestFile" > $NagiosCfgtestFile
egrep -i "(^warning|^error)" "$TMPFILE" >> $NagiosCfgtestFile
cat "$TMPFILE"
exit 8
fi
}